Back button text and Nav title


#1

If I use view-title attribute on ion-view, then descendant navs’ back button shows the correct text.
However if I use <ion-nav-title>{{myTitle}}</ion-nav-title> instead, the previous view title gets undefined and the back button text falls back to “Back”.

Can I fix this? Or is this the way how it works?)


#2

The docs say that ion-nav-title should be used when you want to place html or images in the title. If you are simply adding text to the title you should be able to use view-title to dynamically set the title. I am not sure if there will be support for html/images in the back button, but if you are using plain text you can try this. See this codepen.


#3

Thanks. I returned to using title attribute and it’s working fine. Just wanted to know whether I can use ion-nav-title for this purpose.