Skip to content

Instantly share code, notes, and snippets.

@gsans
Created January 29, 2015 19:33
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gsans/462fa27f1f9ea66c21b2 to your computer and use it in GitHub Desktop.
Save gsans/462fa27f1f9ea66c21b2 to your computer and use it in GitHub Desktop.
// Routing setup
.config(function ($routeProvider) {
$routeProvider
.when('/home', {
controller: 'homeCtrl',
templateUrl: 'home.tpl.html'
}).when('/users', {
controller: 'usersCtrl',
controllerAs: 'vm',
templateUrl: 'users.tpl.html',
resolve: {
load: ['injectCSS', function (injectCSS) {
return injectCSS.set("users", "users.css");
}]
}
}).otherwise({
// default page
redirectTo: '/home'
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment