ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Nested <ion-nav-view> does not get cleared when going back to parent state

Open imgx64 opened this issue 12 years ago • 8 comments

This is how it works with plain Angular and ui-router's ui-view: http://plnkr.co/edit/R8TLXVe2PuBcPHQiuPH8?p=preview

When you click Open child, the nested ui-view gets filled with the child template. Then you press Back, it goes back to the parent state and the ui-view is cleared.

This is the exact same code but with ionic's ion-nav-view instead: http://plnkr.co/edit/zzUU1YLE5gR0MOFoxECv?p=preview

When you press Back, the state does go back, but the nested view does not get cleared

imgx64 avatar Nov 26 '14 18:11 imgx64

This is a problem for me at the moment. It's making nested view extremely difficult to work with.

tannerlinsley avatar Oct 08 '15 07:10 tannerlinsley

I also encountered the same problem. And how to resolve it?

BskyRui avatar Dec 08 '15 03:12 BskyRui

Seeing the same behavior in a simple app with three states, 1 parent and 2 children. The Nav Bar's Title and buttons also remain from the nested state after going back to the parent. Both the ionic nav bar's Back button and the browser's back button exhibit the same behavior.

aschwartz-satcom avatar Dec 18 '15 18:12 aschwartz-satcom

Hello! Are you all still seeing the same issue with the latest version of ionic?

jgw96 avatar Mar 23 '16 18:03 jgw96

@jgw96 The Plunker linked above uses the latest nightly v1, and the problem still occurs. I don't know about v2 however.

imgx64 avatar Mar 25 '16 15:03 imgx64

try just using ui-view, since ion-nav-view is designed to be a full screen, one time thing.

wbhob avatar Jan 06 '17 02:01 wbhob

This issue was moved to driftyco/ionic-v1#1

jgw96 avatar Jan 13 '17 20:01 jgw96

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 05 '18 02:09 ionitron-bot[bot]