I use both the Ionic framework and the IU router to improve navigation for your first web application.
Here is a simple architecture so you can easily understand the structure:

The problem I am facing is that I cannot save state when navigating between tabs. eg. when I go to the next tab and click on the next view and click "Back", I go to the first button, and when I go back to the second tab, I donβt see the same state as me.
I can not solve this problem.
here is a DEMO: PLUNKER DEMO + CODE
and this is my status code:
.config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('live.today', { url: '/today', views: { today: { templateUrl: 'today_live.html', } } }) .state('live.yesterday', { url: '/yesterday', views: { yesterday: { templateUrl: 'yesterday_live.html' } } }) .state('live.tomorrow', { url: '/tomorrow', views: { tomorrow: { templateUrl: 'tomorrow_live.html' } } }) .state('match.composition', { url: '/composition', views: { view: { templateUrl: 'composition.html' } } }) .state('match.resume', { cache: false, url: '/resume', views: { view: { templateUrl: 'resume.html' } } }) .state('live', { url: '/live', views: { live_view: { templateUrl: 'live.html' } } }) .state('match', { cache: false, url: '/match_details', views: { live_view: { templateUrl: 'match_details.html' } } }) .state('news', { cache: false, url: '/news', views: { news: { templateUrl: 'news.html' } } }) $urlRouterProvider.otherwise('/live/today'); })
angular-ui-router ionic-framework
Yasser B.
source share