Skip to content

Instantly share code, notes, and snippets.

@OswaldoMartinezMendez
Created July 21, 2016 17:12
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 OswaldoMartinezMendez/ee492b44fe09049168d244024233bbe3 to your computer and use it in GitHub Desktop.
Save OswaldoMartinezMendez/ee492b44fe09049168d244024233bbe3 to your computer and use it in GitHub Desktop.
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