Created
May 2, 2015 09:46
-
-
Save riccardomerolla/5b2e39250c97d27caceb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
'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