Advertisement
Guest User

Untitled

a guest
May 26th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. $stateProvider.state('profile', {
  2. url: '/{uid}',
  3. views: {
  4. 'main': {
  5. templateUrl: 'templates/profile.ejs',
  6. controller: 'ProfCtrl',
  7. onEnter: ['$state', 'auth', function ($state, auth) {
  8. if (!auth.isLoggedIn()) {
  9. $state.go('home');
  10. // TODO: Show error?
  11. }
  12. }]
  13. }
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement