We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8342a31 commit 1bfcc1fCopy full SHA for 1bfcc1f
app/templates/client/app/app(coffee).coffee
@@ -36,5 +36,6 @@ angular.module '<%= scriptAppName %>', [<%= angularModules %>]
36
# Redirect to login if route requires auth and you're not logged in
37
$rootScope.$on <% if (filters.ngroute) { %>'$routeChangeStart'<% } %><% if (filters.uirouter) { %>'$stateChangeStart'<% } %>, (event, next) ->
38
Auth.isLoggedIn (loggedIn) ->
39
+ event.preventDefault()
40
<% if (filters.ngroute) { %>$location.path '/login'<% } %><% if (filters.uirouter) { %>$state.go 'login'<% } %> if next.authenticate and not loggedIn
41
<% } %>
0 commit comments