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

21 lines
673 B
JavaScript

angular.
module('catalog').
config(['$locationProvider', '$routeProvider',
function config($locationProvider, $routeProvider) {
//$locationProvider.hashPrefix('!');
$locationProvider.html5Mode(true);
$routeProvider
.when('/',{ template: '<an-home></an-home>'})
.when('/catalog', {
template: '<an-list></an-list>'
})
.when('/catalog/:itemId', {
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: '/'});
}
]);