Ion tab for navigation

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:

enter image description here

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'); }) 
+7
angular-ui-router ionic-framework
source share
1 answer

Finally, I found a solution that should add " <ion-content> </ion-content> to the file where I have three tabs (live.html).

You can take prey in an updated demo for those who have the same sophisticated presentation architecture.

0
source share

All Articles