Last active
August 29, 2015 14:05
-
-
Save srph/039124ab9a8c67e9a538 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.config(['$stateProvider', function($stateProvider) { | |
var auth = { | |
name: 'auth', | |
abstract: true, | |
template: '<div ui-view></div>', | |
resolve: { | |
auth: ['AuthSrvc', function(AuthSrvc) { | |
return AuthSrvc.check() | |
}] | |
} | |
} | |
var settings = { | |
name: 'auth.settings' | |
url: '/settings', | |
abstract: true, | |
templateUrl: '/views/auth/settings/template.html', | |
data: { | |
pageTitle: 'Settings' | |
} | |
}; | |
var profile = { | |
name: 'auth.settings.profile', | |
url: '/profile', | |
templateUrl: '/views/auth/settings/profile/template.html', | |
controller: 'ProfileSettingsCtrl', | |
data: { | |
pageTitle: 'Profile Settings' | |
}, | |
resolve: { | |
user: ['UserSrvc', 'AuthSrvc', function(UserSrvc, AuthSrv) { | |
authID = AuthSrvc.user.id | |
return UserSrvc.get(authID) | |
}] | |
} | |
}; | |
$stateProvider.state(auth).state(settings).state(profile); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment