ionic2: Header Title not aligning center

By Thripthi Haridas

I’m trying to align menu toggle icon to left and title to center of the header. I’m using the below code:

<ion-header>
  <ion-toolbar color="primary">
     <button ion-button menuToggle left>
      <ion-icon name="menu"></ion-icon>
     </button>
     <ion-title>
      Home
     </ion-title>
 </ion-toolbar>

But the title doesn’t appear in the centre. please help out. thanks in advance.

Source: Stack Overflow

    

Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273