ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
193 stars 187 forks source link

Nested views with cache false not removed #209

Open AgDude opened 7 years ago

AgDude commented 7 years ago

Short description of the problem:

When navigating from a nested state with cache:false to a different top-level state, the scope is not destroyed.

What behavior are you expecting?

When leaving a view with option cache:false the scope should be destroyed.

Demonstration: http://plnkr.co/edit/c0tlBGxRdKXmyuaBzN0X?p=preview

Probably related to, but more specific than #105

AgDude commented 7 years ago

I had thought, and mentioned in plunker that the cache was properly canceled within the same parent state, but that is probably only because it is detected as a "back" navigation.

When navigating from core.one.main (a nested view) to a different parent view (core.two) the transitionEnd method is only called on the top level view, not the parent view. So the nested view which should be destroyed is not found in the element.children