multiple navigator with tabbar not working in newer version of onsen
-
@misterjunio I have changed class to tabbar as you said but I am talking about back-button which is not working after pushPage method of navigator and according to onsen docs ons-page is called inside ons-navigator
-
even I have changed my code and wrapped page inside navigator back button still doesn’t work and some code runs in older onsen version
-
@Fran-Diox actually I wanted to use ons-card and ons-toast that’s why I changed onsen version
can I use this components in same version
-
@Gaurav like @Fran-Diox said it’s too hard to analyze the whole code, please try to produce a minimal example that shows the problem. You cannot use those components on a version prior to
2.3.0
.
-
ok this is my movie.html code
<ons-page> <ons-navigator var="movieNavigator" > <ons-button ng-click="movieNavigator.pushPage('moviestyle.html')"></ons-button> </ons-navigator> </ons-page>
-
This post is deleted!
-
ok this is my navigator page
<ons-page> <ons-navigator var="movieNavigator" id="movieId"> <ons-button ng-click="movieNavigator.pushPage('moviestyle.html')"> PushPage </ons-button>
-
this is moviestyle.html
<ons-page> <ons-button modifier="light" onclick="movieId.popPage()"> Pop Page </ons-button> </ons-page>
-
when I click the button I am getting the error as
ons-navigator’s page stack is empty.
-
This post is deleted!
-
hey @Fran-Diox I found this but it is for outside tabbar and I want navigator inside tabbar which is working in older version but getting warning as tried to load angular more than once maybe that’s why it is not working
-
@Gaurav There are about 20 posts on this topic, most of them showing a lot of code that is not useful to reproduce the issue that you have. You know, it’s quite hard to follow all of this and try to help you. If you try to provide a small demo in codepen or anywhere else where we can see your issue and debug it, you’ll get help much faster.
Apart from that, if the back button says that the navigator stack is empty… well, it means that you only have 1 page pushed. If you are sure you have more than 1, perhaps you are popping in the wrong navigator or you are missing some HTML closing tags in some of your pages.
The fact that it was working in old versions just means that now is a bit more strict about DOM mistakes than before. For example, before it was generating
ons-page
elements automatically if you forgot them, but now you must provide them manually. All of that is reflected in the changelog.
-
This post is deleted!
-
ok @Fran-Diox I will put my code in codepen And share you A link
-
hey @Fran-Diox check this codepen link
-
problem is with push page method in promotion.html template
-
hii @Fran-Diox problem solved check my codepen here I wrapped ons-navigator inside ons-page and again ons-page inside navigator but in docs this thing was not mentioned anyway thank you so much for helping me cheers!!