How can I do that with ui-router? In ui-router I'm using this syntax :
router
.when('/login',{
    templateUrl:'app/view/page/users/login.html',
    isLogged:true
})
app run
$rootScope.$on('$routeChangeStart',function(event,next) {
    if(next.$$route.isLogged){
        console.log('...')
    }
})
I tried change route to state in ui-router but I get isLogged undefined. How can I solve that?
 
    