Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic Menu button not appearing

I created and ionic project using the command

ionic start sideMenu http://codepen.io/vialware/pen/ypoxd

I expected the app to be like what is shown below.

enter image description here Nevertheless, when I run it something is missing, the menu button. It is being created I guess using in the header using this tag:

<ion-view title="'Welcome'" hide-back-button="true" left-buttons="menuButton">

enter image description here

I'm able to build and emulate the project without any errors and so I'm wondering whether I might have done something wrong and if anyone might have a hint on how to solve this problem (I'm new to both Ionic and AngularJS).

like image 535
Y. Leonce Eyog Avatar asked Jun 18 '26 18:06

Y. Leonce Eyog


2 Answers

You can also use this :

    <ion-header-bar align-title="left" class="bar-positive">
                <h1 class="title">Title!</h1>
    </ion-header-bar>

But don't forgot to put has-header to your content or your content will be behind this header bar

<ion-content class="has-header">
     // Content
</ion-content>
like image 165
carton Avatar answered Jun 22 '26 20:06

carton


In order to have that specific header, here's what your code should look like:

<div class="bar bar-header bar-positive">
  <button class="button icon ion-navicon"></button>
  <h1 class="title">Welcome</h1>
</div>

Note that the bar-positive class is only setting the blue color background on the header.

like image 43
LPB Avatar answered Jun 22 '26 18:06

LPB



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!