anorgatarrak-wordpress-theme/app/catalog/catalog.config.js

25 lines
781 B
JavaScript

angular.
module('catalog').
config(['$locationProvider', '$routeProvider',
function config($locationProvider, $routeProvider) {
//$locationProvider.hashPrefix('!');
$locationProvider.html5Mode(true);
var a = window.location.host.split('.')[0];
$routeProvider
.when('/',{ template: '<an-home></an-home>'})
.when('/catalog', {
template: '<an-list></an-list>'
})
.when('/catalog/:slug', {
template: '<an-detail></an-detail>'
})
.when('/info', {template: '<an-info></an-info>'})
//.when('/contact', {template: '<an-contact></an-contact>'})
.when('/:slug',{template: '<an-content></an-content>'})
.otherwise({ redirectTo: '/'});
}
]).
run(function($rootScope) {
$rootScope.loading = false;
});