Basic navigator question
-
Hi
I’ve an app with multiple pages in one HTML file. I see in the documentation examples with only the first page wrapped in a navigator. Will it then work for all pages? Or is something else needed:
<navigator>
<page1>
</page1><page2>
</page2></navigator>
or
<navigator></navigator>
<page1>
</page1><page2>
</page2>or does every page need it’s own navigator?
Thanks!
-
@Remco-Koffijberg I believe this tutorial will answer your questions: http://tutorial.onsen.io/?framework=vanilla&category=Reference&module=navigator
-
Thank you for the link.
I think i do understand it, but because i’ve chosen the ‘side menu template’ with a splitter, it’s somehow more complex. As soon as i add the navigator outside the templates (but after the splitter) the side menu is not tappable anymore.
I solved it by adding several navigators around some of the templates. It does work… but i don’t really understand it. (-; Maybe i can solve it just using " fn.load(‘page.html’) "
-
@Remco-Koffijberg This tutorial combines navigator and splitter.
You just need to put 1 page inside the navigator and then push new pages with
myNavigator.pushPage(...)
.
-
@Fran-Diox
Thanks so much, the tutorial covers it.The side nav is working.
But in JS the call to ‘myNavigator’ is empty. I wrapped the (same) navigator around the page and then it worked…
-
moving this to Onsen section