ons-navigator Multiple Navigator in one page template

别等时光非礼了梦想. 提交于 2019-12-06 11:42:02

Are you using multiple navigators for any specific reason? I think one navigator for what you want to do is completely enough. Put one navigator in the parent element ("directory.html" in this code) and remove it from the rest of them. The pages you call from "directory.html" will also have access to that navigator, so there is no need to create new ones. Also, an ons-navigator should always have an ons-page inside, so don't remove it or you will see Error: You can not supply no "ons-page" element to "ons-navigator". You can think in the ons-navigator as a "frame" whose content are ons-pages that change depending on what you push/pop. You don't need a frame inside a frame, do you?

Hope it helps!

Have you tried changing the associated variable name for the second navigator ?

<ons-navigator var="app.navi" >

There might be a conflict in variables.

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