I have released a new application with ionic and it works well in ios and android but when i tested in oneplus , sometimes pages stuck between two pages and ion backbutton was also not working. One plus device having swipe back to navigate and i also enabled swipe back in the application too is it the issue for that? I don’t know why it happened like this. Anyone please help me
yes, there is this same problem of the ion-back-button not working on any and all android phones using API level 28, Although, user can use the back button on the soft keypad to navigate back…, even I found this issue recently…
My pages got stuck between pages too. Now I disabled swipe in ionic application but I don’t know is it the problem. But this issue not always showing only sometimes. Cant reproduce this issue:unamused:
It’s mostly router history that gives a problem, its hard to explain, but let me try, I will start with the Ones that work and then come to the one that does work reason begin the routes are nested and the tangle can be seen only if explain it from success to fail…
CASE-1
Say you have a side menu which has menu-links that navigate to various Top level pages, i mean the routes with no children routes to it… then the router and its history has no prb operating the back button
CASE-2
Now here we have the same side menu, however this time on the top level pages we have unique tabs on each of the pages…
Now, if you navigate To Page1[p1] then to Tab1[t1] then to Tab2[t2], with the P1 having default-Link="/page1/"
then the router will have no issue to to operate the back-button
CASE-3
Lets now add Page2[p2] and have tabs on them Set default-Link="/page2/
, and update the Page1->Tab3 and link it to Page2->Tab2
Here it might sound confusing but taking by an example… Say Page1 is Dashboard and the tab are like the quick action button pointing to other pages and specific tabs on them, in this case, Page2->Tab2, Now the Back-button will start to act up if we go P1->Tab1->Tab2->Tab3 [here we get routed to a page-2 and a tab-2 on that page, basically a child on the /page2/
route] Now the back-button wont work, but using the backbutton on the soft-Keypad will take you back to the /page-1
remember we are on page-2/tab2 so clicking back we expect to go to page1->tab2 but we end up on /page-1/
which is the default-link
So while navigating around stackoverflow for this navigation issue i just stumbled upon this thread
Not that you need care anything about my opinion, but in my book that is not an appropriate use of tabs. Tabs need to be independent and self-contained - I can leave tab A, go do stuff in other tabs, come back to tab A, and it will be just like I left it.
What you are calling “quick-action buttons” would, I think, be more appropriate in a toolbar or sidenav.
one thing I can agree on is that Tabs should be self contained, however in my current projected we had a nested sidemenu and it was later mandated that we should not use nested sub menus [no clue why that was asked…] since the sub-menu count was less than 4 menuItems per top-Menu link we decided to move them to tabs… as they work on top level navigation…
The only-one-level sidemenu requirement makes no sense to me either. On the off-chance that you (a) are still not happy with what you have and (b) haven’t yet seen this trick, you can implement something that looks like tabs, but can be managed however you see fit (it sounds like what you really have are nested child routes), with segments.
Yes they are just child routes most of them carry :params
and Queries
So my first instinct in that case would be to have an “active segment” parameter in each of these child routes that tells you which pseudo-“tab” is to be activated. Each page that hosts these “tabs” (quotes reminding that they aren’t really implemented as tabs) can subscribe to the ActivatedRoute
and set a flag corresponding to the “active tab index” that can be used as a discriminator to show different content.
IOW, the final “stage” of routing would be done not with tabs explicitly, but it would present that way to the user (which I still am not a huge fan of on philosophical terms, but again, nobody has to agree with me).
I think that should make the router and navigation stack happier.
I will give segments a try, and as far as the : params
& queries
goes they are used to populate the sub-menu Links
Simply put the user logs in and in response it gets a bunch of info along with the token, which is then used to build /render the links for the sub-menu…
The Sub-menu links do change based on userRole…