2017-08-20 12:55:35 +02:00
|
|
|
angular.
|
|
|
|
module('catalog').
|
|
|
|
config(['$locationProvider', '$routeProvider',
|
|
|
|
function config($locationProvider, $routeProvider) {
|
2017-11-09 19:40:49 +01:00
|
|
|
//$locationProvider.hashPrefix('!');
|
|
|
|
$locationProvider.html5Mode(true);
|
2017-12-15 01:17:46 +01:00
|
|
|
var a = window.location.host.split('.')[0];
|
2017-11-09 19:40:49 +01:00
|
|
|
$routeProvider
|
|
|
|
.when('/',{ template: '<an-home></an-home>'})
|
|
|
|
.when('/catalog', {
|
2017-08-20 12:55:35 +02:00
|
|
|
template: '<an-list></an-list>'
|
2017-11-09 19:40:49 +01:00
|
|
|
})
|
2017-12-15 01:17:46 +01:00
|
|
|
.when('/catalog/:slug', {
|
2017-08-20 12:55:35 +02:00
|
|
|
template: '<an-detail></an-detail>'
|
2017-11-09 19:40:49 +01:00
|
|
|
})
|
|
|
|
.when('/info', {template: '<an-info></an-info>'})
|
2017-12-15 01:17:46 +01:00
|
|
|
//.when('/contact', {template: '<an-contact></an-contact>'})
|
2017-11-09 19:40:49 +01:00
|
|
|
.when('/:slug',{template: '<an-content></an-content>'})
|
|
|
|
.otherwise({ redirectTo: '/'});
|
2017-08-20 12:55:35 +02:00
|
|
|
}
|
2017-12-15 01:17:46 +01:00
|
|
|
]).
|
|
|
|
run(function($rootScope) {
|
|
|
|
$rootScope.loading = false;
|
|
|
|
});
|