Skip to content

Instantly share code, notes, and snippets.

@shawnwildermuth
Created October 14, 2014 23:36
Show Gist options
  • Save shawnwildermuth/47f3ce781e871ae3efae to your computer and use it in GitHub Desktop.
Save shawnwildermuth/47f3ce781e871ae3efae to your computer and use it in GitHub Desktop.
Example of Route in AngularJS
module.config(function ($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'templates/order.tmpl.html',
controller: 'orderController',
controllerAs: "order"
});
$routeProvider.when('/status', {
templateUrl: 'templates/status.tmpl.html',
controller: 'statusController',
controllerAs: "status"
});
$routeProvider.otherwise({redirectTo: '/'});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment