Hi. I’m developing my first app with Ionic v1 and now I have a little problem. Let me explain.
I have 3 tabs home,tab2,tab3.
On home tab I have 1 deeplink which is normally from the tab2 content and when I click on the link it goes to /tab2/deeplink. Here comes the problem, because after I click on the tab2 the history is the content from /tab2/deeplink/ not the content from /tab2.
Also if I go from home > /tab2/deeplink and after that on tab1 > tab2 it shows the content from /tab2/deeplink/ and if I click back it goes to /tab1/
Normal should be:
Home > /tab2/deeplink → clicking back should go to Home
Tab2 > The content > /tab2/deeplink → clicking back should go to Home.
Hope you understand! Thank you!
on clicking of deeplink from home, you have to use $state.go('tabs.read'). This should go back to home on back click.
Otherwise, If you want to get back to home from the deeplink page at all times, you have to override the backbutton action to go to the home view on the controller of the deeplink page.
Secondly, to remove history, you have to disable cache for that view
Disable cache within state provider
Thank you! I’ve tried this solution and it works If I go to tab.readarticles but I need to go dipper like /tab/read/articleId and with $state.go I can’t make it work.
The same /tab/read/articleId links are inside tab.readarticles.
Edit:
deeplinking solved with $state.go(“tabs.read”, { articleUrl: a });
but if I click on the bottom tab it still goes to the article I clicked from the first page. Its not showing the list with articles!