Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. angular.module('app', [
  2. //Your Dependencies Here
  3.  
  4. ]).run(init);
  5.  
  6. function init($rootScope, sessionService) {
  7. //ngRoute
  8. $rootScope.$on('$routeChangeStart', function (angularEvent, next, current) {
  9. sessionService.validateSession();
  10. });
  11.  
  12. //ui-router
  13. $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
  14. sessionService.validateSession();
  15. });
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement