Error: NavigatorView's page stack is empty in onsenui

落爺英雄遲暮 提交于 2019-12-24 11:58:54

问题


I'm developing mobile application using onsenUI and facing this problem when navigating to pages in stack.

When moving from first page to second page, we normally use pushPage(). From second page to first page, we use popPage(). But when moving from third page to second page using back button and from second page to first page, I'm getting

Error: NavigatorView's page stack is empty

I tried using resetToPage() but still getting this error..

Here what I tried.

PLUNKER

UPDATED:

When navigating from services.html to index.html, I'm getting this error in console. Please check this. When I poppage from third page to second page, then second page to first page, I'm getting error as navigation view page stack is empty


回答1:


<ons-back-button> already perform a popPage itself, so there is no need to do ng-click="myNavigator.popPage() in it. With that it will try to delete 2 pages from the stack when there is only 1, so it warns that the page stack is empty when trying to perform the second popPage. Hope it helps!



来源:https://stackoverflow.com/questions/28928418/error-navigatorviews-page-stack-is-empty-in-onsenui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!