Created
October 14, 2014 23:36
-
-
Save shawnwildermuth/47f3ce781e871ae3efae to your computer and use it in GitHub Desktop.
Example of Route in AngularJS
This file contains 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
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