I have this function, when it's executed, it's fired twice. I see alert(ok)
then alert(ok)
I don't know why.
$rootScope.$on( "$routeChangeStart", function(event, next, current) {
if ( next.templateUrl == "partials/login.html" ) {
alert( "ok" );
$location.path( "/login" );
}
}