Last active
December 19, 2015 23:09
-
-
Save fnakstad/6032777 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
angular.module('myApp', ['myApp.services', 'ngCookies']) | |
.config(['$routeProvider', '$locationProvider', | |
function ($routeProvider, $locationProvider) { | |
// ... | |
var access = routingConfig.accessLevels; | |
$routeProvider.when('/register', | |
{ | |
templateUrl: 'partials/register', | |
controller: RegisterCtrl, | |
access: access.anon | |
}); | |
$routeProvider.when('/private', | |
{ | |
templateUrl: 'partials/private', | |
controller: PrivateCtrl, | |
access: access.user | |
}); | |
$routeProvider.when('/admin', | |
{ | |
templateUrl: 'partials/admin', | |
controller: AdminCtrl, | |
access: access.admin | |
}); | |
// ... | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment