Hey guys, I’m still having difficulties finding a way to implement tutorial page after Ionic app has been installed for the first time. Is that even possible to make a tutorial page using ionic ?
Yes that is absolutely possible. Hope this helps
use a localStorage variable in app.run like
if(!localStorage.isFirstTime){ // this will check either this key is set in localstorage or not
// you are coming first time
// redirect to tutorial view
localStorage.isFirstTime = "nopessss"; // this will set isFirstTime key in localstorage so that this condition will not be executed next time.
}
1 Like
@mrameezraja sorry for my late reply, i tried use $state.go for testing first, but my page won’t redirect to the targeted state. Here’s my code =>
.run(function( $state,$rootScope,$localStorage,$location,TutorialCheck ) {
$state.go('app.tutorial');
});
I wonder what’s my mistake…
try adding timeout or $location.path(’…’)
.run(function( $state,$rootScope,$localStorage,$location, $timeout, TutorialCheck ) {
$timeout(function(){
$state.go('app.tutorial');
}, 1000);
// or
$location.path('url...');
});
@mrameezraja works like a charm, thank you sir.