1234567891011121314151617181920212223242526 |
- angular.module("noteWrangler")
- .config(function ($routeProvider, $locationProvider) {
- $locationProvider.hashPrefix('');
- $routeProvider
- .when("/notes/:id", {
- templateUrl: "templates/pages/notes/show.html",
- controller: 'NotesShowController',
- // No longer needed since we now pass $scope to controller.
- // controllerAs: 'showController'
- })
- .when("/notes", {
- templateUrl: "templates/pages/notes/index.html",
- controller: 'NotesIndexController',
- // No longer needed since we now pass $scope to controller.
- // controllerAs: 'indexController'
- })
- .when("/users", {
- templateUrl: "templates/pages/users/index.html"
- })
- .when("/", {
- templateUrl: "templates/pages/notes/index.html"
- })
- .otherwise({
- redirectTo: "/"
- });
- });
|