app.routes.js 649 B

1234567891011121314151617181920212223242526
  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. .when('/authors', {
  21. templateUrl: 'app/views/authors.template.html',
  22. controller: 'Authors'
  23. })
  24. .otherwise('/');
  25. })