$stateProvider
.state('public', {
abstract: true,
template: "<div ui-view></div>",
data: {
access: access.public
}
})
.state('public.404', {
url: '/404/',
templateUrl: './templates/404.html',
data: {
bodyClass: 'page-404-3'
}
})
.state('public.403', {
url: '/403/',
templateUrl: './templates/403.html',
data: {
bodyClass: 'page-404-3'
}
});
// Anonymous routes
$stateProvider
.state('anon', {
abstract: true,
template: "<div ui-view></div>",
data: {
access: access.anon
}
})
.state('anon.login', {
url: '/login/',
templateUrl: './templates/login.html',
data: {
bodyClass: 'login',
redirectTo: 'admin.dashboard'
}
});
$stateProvider
.state('admin', {
abstract: true,
templateUrl: "./templates/main.html",
data: {
access: access.admin,
bodyClass: 'page-header-fixed page-container-bg-solid page-sidebar-closed-hide-logo page-header-fixed-mobile page-footer-fixed1'
}
})
.state('admin.dashboard', {
url: "/dashboard/",
templateUrl: "./templates/dashboard.html"
});
// Images routes
$stateProvider
.state('admin.images-all', {
url: "/images/",
templateUrl: "./templates/images-all.html",
controller: 'AllImagesCtrl',
controllerAs: 'allImagesCtrl'
})
.state('admin.images-add', {
url: "/images/add/",
templateUrl: "./templates/images-add.html",
controller: 'AddImagePageCtrl',
controllerAs: 'addImagePageCtrl'
})
.state('admin.images-edit', {
url: "/images/:id/",
templateUrl: "./templates/images-edit.html",
controller: 'EditImageCtrl',
controllerAs: 'editImageCtrl'
});
// Categories routes
$stateProvider
.state('admin.categories-all', {
url: "/categories/",
templateUrl: "./templates/categories-all.html",
controller: 'AllCategoriesPageCtrl',
controllerAs: 'allCategoriesPageCtrl'
});
// Products routes
$stateProvider
.state('admin.products-all', {
url: "/products/",
templateUrl: "./templates/products-all.html",
controller: 'AllProductsPageCtrl',
controllerAs: 'allProductsPageCtrl'
})
.state('admin.products-edit', {
url: "/products/:id",
templateUrl: "./templates/products-edit.html",
controller: 'EditProductsPageCtrl',
controllerAs: 'editProductsPageCtrl'
});