ion-view title not appearing

I haven’t been blogging much recently because I intended this blog to be all about Ionic and for the last month or so I’ve been working on a contract doing some Ionic 1 development (an interesting experience having been working with Ionic 2 for 8 months or so).

Anyway, my Ionic 1 app was driving me crazy for a couple of hours yesterday as I found that my view title was not displaying correctly.  I had this in my templates:

 

<ion-view title=" {{ categoryName }}">

 <ion-content>
What I needed was this (ion-nav-title) :
<ion-view>
    <ion-nav-title>{{ categoryName }}</ion-nav-title>
    <ion-content>

 

The former works some of the time but sometimes fails.  The latter method seems to work all of the time.

I expect this is a well known thing but in case someone has the same problem and comes looking, I thought I’d post the solution.

 


I’m a mobile applications developer based in the UK, concentrating primarily on hybrid application development with Ionic but also with native development skills. Please visit www.crossplatformsolutions.co.uk for more information about me and how I may be able to help you with mobile application development, particularly with Ionic but also with other mobile frameworks and technologies.  Thanks for visiting.

 

2 thoughts on “ion-view title not appearing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s