Side Menu page not displaying fully


#1

Happy Sunday good people :sunny: .

I am experiencing some issues around my side menus. I noticed that when I use

<a class="item item-icon-left" href="#/app/Menu Item1">
                Menu Item1 <i class="icon ion-ios-book-outline"></i>
</a>

and I click the menu, the menu page do not slide in. i.e the page do not display fully.

Whereas when I use <ion-item menu-close href="#/app/Menu Item1">Menu Item1</ion-item>
the menu page displays fully.

Kindly check out this link to understand fully http://play.ionic.io/app/155e3d6a52d0

Thanks.


#2

yeah because the sidemenu does not automatically gets closed if you click on an item.
menu-close -> closes the sidemenu and ceates a new history stack for the associated page.

To close the sidemenu you can use:
http://ionicframework.com/docs/api/directive/menuToggle/

and instead of href you could use ng-click and connect a function which uses
http://ionicframework.com/docs/api/service/$ionicSideMenuDelegate/
to close the sidemenu and $state.go(‘stateName’) to navigate to the correct state.


#3

Thanks a lot @bengtler Going through the first option I was able to load the menu page fully but it sort of had struggles loading the page so I tried using menu-close and that solved the problem.

Many thanks for your help bro.