Action bar title doesn't show when set dynamically
See original GitHub issueHi guys,
I recently migrated my {N} + Angular2 app to the 3.0 version of Nativescript, and it globally runs pretty smoothly, yet I encountered a strange behaviour that kind of annoys me.
Platform: I tried it on Android only, I didn’t have the time yet to try it on iOs
Version:
- nativescript 3.1.2
- tns core modules 3.1.0
- tns android 3.1.1
Issue:
When I use a static ActionBar, it works just fine, the title shows so does the navigation button.
<ActionBar width="100%" title="Action Bar title">
<NavigationButton icon="res://ic_arrow_back_white_24" (tap)="goBack()">
</NavigationButton>
</ActionBar>
However, when I dynamically set the ActionBar title with angular, the UI doesn’t seem to be refreshing, and the title doesn’t show:
<ActionBar width="100%" [title]="getActionBarTitle()">
<NavigationButton icon="res://ic_arrow_back_white_24" (tap)="goBack()">
</NavigationButton>
</ActionBar>
The same problem occurs when I dynamically display (or not) certain elements of the action bar, even if the title is static:
<ActionBar width="100%" title="Action Bar title">
<NavigationButton icon="res://ic_arrow_back_white_24" (tap)="goBack()">
</NavigationButton>
<ActionItem icon="res://ic_menu_white_24" text="Do something" (tap)="doSomething()" *ngIf="isAndroid">
</ActionItem>
</ActionBar>
I remember encountering the same kind of issue a long time ago in an old version of {N} while the Telerik dev team was trying to catch up with the daily releases of Angular 😃 so maybe it is a known issue, would you tell me if it is the case, and if there is a workaround ?
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
Thanks, I will try to clone the project and test it, then I’ll get back to you with the results
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.