| 123456789101112131415161718192021222324252627 |
- var app = angular.module('app', ['ngRoute', 'ngSanitize', 'ngResource', 'ui.bootstrap']);
- app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
- $locationProvider.html5Mode(true);
- $routeProvider
- .when('/', {
- templateUrl: 'modules/main/main.html',
- controller: 'mainCtrl'
- })
- .when('/artists', {
- templateUrl: 'modules/artists/artists.html',
- controller: 'artistListCtrl',
- resolve: {
- artists: function(ArtistsService){
- return ArtistsService.getAllArtistsWithAlbums();
- }
- }
- })
- .when('/albums', {
- templateUrl: 'modules/albums/albums.html',
- controller: 'albumListCtrl'
- })
- .otherwise({
- redirectTo: '/'
- });
- }]);
|