From c90d7621b8f17f6e74f8a59f02fd78a8fcf628aa Mon Sep 17 00:00:00 2001 From: Jason Travis Date: Mon, 3 Nov 2014 20:38:38 -0700 Subject: [PATCH] fix(app): missing event.preventDefault --- app/templates/client/app/app(js).js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 + })<% } %>;