html - How can I update actionbar dynamically? -
i have actionbar:
<actionbar> <stacklayout> <flexboxlayout class="action-bar"> <absolutelayout> <image src="first_image.png"></image> <image src="second_image.png"></image> </absolutelayout> <absolutelayout> <label text="label"></label> <textfield text="textfiled"></textfield> </absolutelayout> </flexboxlayout> </stacklayout> i have 3 pages. in first want show first_image , label, in second second_image , textfield , in third first_image without second absolutelayout. how can it?
you may use single absolute layout one-way binding concept
example code:
<actionbar> <stacklayout> <flexboxlayout class="action-bar"> <absolutelayout> <image src="{your image variable}"></image> <label text="{your label text variable}"></label> <textfield text="{ textfield variable}"></textfield> </absolutelayout> </flexboxlayout> </stacklayout> </actionbar> or, try *ngif condition
example code:
<actionbar> <stacklayout> <flexboxlayout class="action-bar"> <absolutelayout> <image *ngif="condition" src="first_image.png"></image> <image *ngif="condition" src="second_image.png"></image> </absolutelayout> <absolutelayout> <label *ngif="condition" text="label"></label> <textfield *ngif="condition" text="textfiled"></textfield> </absolutelayout> </flexboxlayout> </stacklayout> </actionbar>
Comments
Post a Comment