I might have some kind of missunderstanding. Im using angular ui router and i have the next issue:
I have the next State provider:
angular
.module(\'Main
I am having exactly the same problem.
I am using ionic to build a cross-platform mobile app.
I have logic like --> if the user is already logged in. redirect to the main page, otherwise redirect to login page
if(isLogin("userId")){
$state.go("main");
}else{
$state.go("login");
}
This work perfectly on Android but crash occasionally on IOS. After some investigation and research. I use $location.path instead of $state.go and everything works fine.
if(isLogin("userId")){
$location.path("/main");
}else{
$location.path("/login");
}
Hope this help you solve your problem.