I’m very new to this and I’m having an issue I can’t seem to overcome.
When switching between views from the side menu, the view keeps flashing the previous view.
I am using the nav-clear directive, however it appears to not be doing it’s job correctly (Or I’m misunderstanding its functionality).
This is occurring when compiling to iOS 9 on a iPhone 6 via Xcode.
It’s strange as it does not happen in the browser or iOS emulator, with iOS 8.4 or iOS 9.
<ion-list>
<ion-item nav-clear menu-close href="#/app/home" class="item-icon-left">
<i class="icon fa fa-home"></i>
Home
</ion-item>
<ion-item nav-clear menu-close href="#/app/calendar" class="item-icon-left">
<i class="icon fa fa-calendar-o"></i>
Calendar
</ion-item>
<ion-item nav-clear menu-close href="#/app/settings" class="item-icon-left">
<i class="icon fa fa-cogs"></i>
Settings
</ion-item>
</ion-list>
Thanks for your reply. I too am basing my code off the ‘Side Menu App’. My code is almost identical to @popeztl.
In regards to “catching the click”, I presume you mean using ng-click="menuLink('app.link')" on each menu item? I’ve tried this but the when I return false within the menuLink() function (which stops href from firing), the menu-close directive stops working and the menu remains open.
I’ve also tried leaving href blank and also using href="javascript: return false", neither of which work once building onto iOS. The switching between views seems worse.
I found some code that allows you to edit the menu directive. Is this what you mean by “putting it in your ‘menu-close’ directive”? Or is there another directive I should be using?