I have this state
$stateProvider
.state('app', {
url : '/app',
abstract : true,
templateUrl: 'templates/leftmenu.html',
controller: 'GlobalLeftMenuController'
})
.state('app.home', {
url: '/home',
views: {
'app': {
templateUrl: 'templates/app-home/templates/home.html',
controller: 'AppHomeController'
}
}
});
if(localStorage.userId === undefined || localStorage.userId === '') {
$urlRouterProvider.otherwise('/signup');
} else {
console.log("on otherwise going home");
$urlRouterProvider.otherwise('/home');
}
document.addEventListener("resume", function() {
$state.go('app.home');
}, false);
If i close the app by pressing middle button on Android and again comback resume event get fired and it trigger the homeCOntroller.
but when i close the app by pressing phone back button and again come back $urlRouterProvider.otherwise(’/home’); is executed but the controller is not triggered so i got a white screen.