Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

How update history stack after state change in ionic 1

$
0
0

@bikash336 wrote:

I was try to erase and push new page in history to prevent view a page when user press back button or through header back navigation arrow.

My Navigation flow is :

Home -> Quiz -> Quiz list -> Quiz Info -> Quiz Test -> Quiz Complete

User click Quiz form sidemenu its open Quiz List State(app.quiz) then click on any of one will open Quiz info State (app.quizinfo) page, on this page user click on Start Quiz Button form this page will open Quiz Test State (app.quizexe) page once user finish will open Quiz Complete State (app.quizcomplete) page. Now if user press back button or tap on nav arrow on header bar it will back to Quiz Test Page. I wanted to show Quiz Info page instead.


app.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state(‘app.quiz’, {
url: ‘/quiz’,
views: {
‘menuContent’: {
templateUrl: ‘templates/quiz/quizlists.html’,
controller: ‘quizListsCtrl’
}
}
})
.state(‘app.quizinfo’, {
url: ‘/quiz/info’,
views: {
‘menuContent’: {
templateUrl: ‘templates/quiz/quizinfo.html’,
controller: ‘quizInfoCtrl’
}
},
params: {
quizid: null
}
})
.state(‘app.quizexe’, {
url: ‘/quiz/exe’,
views: {
‘menuContent’: {
templateUrl: ‘templates/quiz/quizexe.html’,
controller: ‘quizExeCtrl’
}
},
params: {
quizid: null
}
})
.state(‘app.quizfinish’, {
url: ‘/quiz/finished’,
views: {
‘menuContent’: {
templateUrl: ‘templates/quiz/quizfinish.html’,
controller: ‘quizFinishCtrl’
}
}
});
$urlRouterProvider.otherwise(’/app/home’);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>