app.routes.js 546 B

12345678910111213141516171819202122
  1. app.config(function($routeProvider, $locationProvider) {
  2. $locationProvider.hashPrefix('');
  3. $routeProvider
  4. .when('/', {
  5. templateUrl: 'app/views/home.template.html',
  6. /*controller: 'Home'*/
  7. })
  8. .when('/login', {
  9. templateUrl: 'app/views/login.template.html',
  10. controller: 'Login'
  11. })
  12. .when('/books', {
  13. templateUrl: 'app/views/books-list.template.html',
  14. controller: 'BooksList'
  15. })
  16. .when('/books/:id', {
  17. templateUrl: 'app/views/books-details.template.html',
  18. controller: 'BookDetails'
  19. })
  20. .otherwise('/');
  21. })