Hi guys, I’ve got problem with the side menu (sidemenu ionic template), when using resolve in state configuration. When the resolve evaluation is longer than the expire option (300ms) in menuClose directive (very often in real app), then the $ionicHistory.nextViewOptions (set in the menuClose directive) are probably no longer valid and the “back” button is visible on the destination view (in this case templates/playlists.html). My app.playlists state configuration is:
I think that you have same problem than me. When I navigate to playlists view from another view (in the same level) the back button appears instead of menu button.
I’ve only added this code in a project from sidemenu template:
Would you mind opening an issue for this? It may be related to our animations, but that could lead to a big change, so I’d like to get the other teams members opinion
I’m seeing some similar behavior in 1.2.4 with the side menu:
Let’s say I have 2 side menu items, A and B, where A is the default route and B is a sibling route. Route A has a resolve block that fetches data from a remote API and returns a promise. Route B does not have a resolve block.
When I navigate from A to B, via the side menu, all is well. However, when I navigate back to A from B, it appears the view loads twice–occasionally–causing the hamburger menu to disappear. This seems to be a race condition, as it becomes a more probable outcome as the remote API response times grow.
I solved this problem decorating the closeMenu directive. This directive has a 300 millisenconds hardcoded delay that cause apparently this problem. I solved listening the event $stateChangeSuccess and waiting more 100 milliseconds: