Skip to content

Instantly share code, notes, and snippets.

@riccardomerolla
Created May 2, 2015 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riccardomerolla/5b2e39250c97d27caceb to your computer and use it in GitHub Desktop.
Save riccardomerolla/5b2e39250c97d27caceb to your computer and use it in GitHub Desktop.
'use strict';
angular.module('app').config(['$routeProvider', function ($routeProvider) {
var routes =[{
url: '/dashboard',
config: {
template: '<dashboard></dashboard>'
}
},
{
url: '/help',
config: {
template: '<help></help>'
}
}
];
routes.forEach(function (route) {
$routeProvider.when(route.url, route.config);
});
$routeProvider.otherwise({ redirectTo: '/help' });
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment