Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $stateProvider.state('profile', {
- url: '/{uid}',
- views: {
- 'main': {
- templateUrl: 'templates/profile.ejs',
- controller: 'ProfCtrl',
- onEnter: ['$state', 'auth', function ($state, auth) {
- if (!auth.isLoggedIn()) {
- $state.go('home');
- // TODO: Show error?
- }
- }]
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement