Ion Menu button does not appear

I created and ionic project using command

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

      

I expected the application to be similar to what is shown below.

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

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

      

enter image description here

I can build and emulate the project without any errors, and so I wonder if I might be doing something wrong and if anyone can think of how to solve this problem (I am new to Ionic and AngularJS).

+3


source to share


4 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 forget to put a has-header in your content, or your content will be behind that header bar.

<ion-content class="has-header">
     // Content
</ion-content>

      

+1


source


To have that specific title, this is how your code looks 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 only sets the background color to blue in the header.

+1


source


In my case, the change I made was added by an attribute enable-menu-with-back-views="true"

as shown below. The button and sidemenu content is then displayed in all views.

<ion-side-menus enable-menu-with-back-views="true">

      

Please refer to the link:

http://ionicframework.com/docs/api/directive/menuClose/

+1


source


How do you launch your application? If you just open your index.html in a browser, it probably won't work ... Try running it with localhost (local web server).

Assuming it's true ... you need to enable IIS server and run your site there.

If you don't know how to do this, you can try the following tutorials.

http://www.iis.net/learn/install/installing-iis-7/installing-iis-on-windows-vista-and-windows-7- https://www.youtube.com/watch?v= dZAbdmPrU4g

HOPE THIS IS HELP :)

0


source







All Articles