app.js 575 B

123456789101112131415161718192021
  1. var app = angular.module('app', ['ngRoute', 'ngSanitize', 'ngResource', 'ui.bootstrap']);
  2. app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
  3. $locationProvider.html5Mode(true);
  4. $routeProvider
  5. .when('/', {
  6. templateUrl: 'modules/main/main.html',
  7. controller: 'mainCtrl'
  8. })
  9. .when('/artists', {
  10. templateUrl: 'modules/artists/artists.html',
  11. controller: 'artistListCtrl'
  12. })
  13. .when('/albums', {
  14. templateUrl: 'modules/albums/albums.html',
  15. controller: 'albumListCtrl'
  16. })
  17. .otherwise({
  18. redirectTo: '/'
  19. });
  20. }]);