app.routes.js 320 B

1234567891011121314
  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('/books', {
  9. templateUrl: 'app/views/books-list.template.html',
  10. controller: 'BooksList'
  11. })
  12. .otherwise('/');
  13. });