We recently noticed that we’d had issues getting the view title of an element to be updated based upon a scope variable. In the cases we were having issues we were setting the view-title attribute of the ion-view directive. This codepen demonstrates the issue;
See the Pen Ionic ion-view view-title not binding by Todd Halfpenny (@toddhalfpenny) on CodePen.
To get around this issue you can use the ion-nav-title directive instead and this should resolve the issue. From my investigations it looks like this issue seems to only arise if you’re using JavaScript promises to obtain the data. This codepen demonstrates the work-around.
See the Pen Ionic ion-view Title updated using ion-nav-title by Todd Halfpenny (@toddhalfpenny) on CodePen.
I call it a work-around as I doubt the former behaviour of the view-title attribute is as the Ionic devs intend it, and indeed their is a bug open on github for it.
We hope this short blog helps a few folk out.
Ever thought about building Ionic Apps for enterprise? Well Mobilecaddy makes it a breeze to build offline, robust Ionic apps for Salesforce.com. Why not sign up to our beta?