Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('app', [
- //Your Dependencies Here
- ]).run(init);
- function init($rootScope, sessionService) {
- //ngRoute
- $rootScope.$on('$routeChangeStart', function (angularEvent, next, current) {
- sessionService.validateSession();
- });
- //ui-router
- $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
- sessionService.validateSession();
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement