diff --git a/app/templates/client/app/app(js).js b/app/templates/client/app/app(js).js index eef485d7c..c8850ed07 100644 --- a/app/templates/client/app/app(js).js +++ b/app/templates/client/app/app(js).js @@ -48,8 +48,9 @@ angular.module('<%= scriptAppName %>', [<%= angularModules %>]) $rootScope.$on(<% if(filters.ngroute) { %>'$routeChangeStart'<% } %><% if(filters.uirouter) { %>'$stateChangeStart'<% } %>, function (event, next) { Auth.isLoggedInAsync(function(loggedIn) { if (next.authenticate && !loggedIn) { + event.preventDefault(); $location.path('/login'); } }); }); - })<% } %>; \ No newline at end of file + })<% } %>;