Code structure -
<div ng-show="displayCarousel"> Let us call this as screen A <ion-header which has the side menu button> </ion-header> <ion-view> <ion-slide-box> This has a slide with list items. </ion-slide-box> </ion-view> </div> <div ng-include="someUrl.html" ng-hide="displayCarousel"> Let us call this as screen B This page also has header with a back button. </div>
Why this Structure - I want the carousel (screen A) to be in the DOM and on the click on one of the list items in the slide, open its detailed view (screen B). The problem is that when I go back from screen B to screen A by pressing the back button on screen B, the screen changes as per the ng-show/ng-hide but the menu opens after a brief second.
To be noted I fire an event on the back button and then change the values of the ng-show/ng-hide.
What is happening inside - After the broadcast function has been processed. The $digest cycle is called and after that the call goes to the
triggerMouseEvent function in the ionic bundle, which is causing the side-menu to open.
Problem - How to resolve this issue? This issue is reproducible in Beta 11 and Beta 6 as far as I have tested.