Skip to content

Commit f6f912f

Browse files
committed
Merge pull request #683 from corburn/master
fix(app): Add event.preventDefault to login redirect
2 parents b8f0ab0 + c90d762 commit f6f912f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: app/templates/client/app/app(js).js

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ angular.module('<%= scriptAppName %>', [<%= angularModules %>])
4848
$rootScope.$on(<% if(filters.ngroute) { %>'$routeChangeStart'<% } %><% if(filters.uirouter) { %>'$stateChangeStart'<% } %>, function (event, next) {
4949
Auth.isLoggedInAsync(function(loggedIn) {
5050
if (next.authenticate && !loggedIn) {
51+
event.preventDefault();
5152
$location.path('/login');
5253
}
5354
});
5455
});
55-
})<% } %>;
56+
})<% } %>;

0 commit comments

Comments
 (0)