Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example Route in AngularJs 1.X
module.config(function ($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'templates/order.tmpl.html',
controller: 'orderController',
controllerAs: 'order'
});
$routeProvider.otherwise({redirectTo: '/'});
$routeProvider.when('/status', {
templateUrl: 'templates/status.tmpl.html',
controller: 'statusController',
controllerAs: 'status'
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.