UNPKG

unserver-unify

Version:

112 lines (107 loc) 3.69 kB
angular.module('bamboo.product', ['ui.router']).config( ['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { $stateProvider.state('index.product', { url: '/productlist/:key', views: { "@index": { templateProvider: function(deviceDetector, $templateFactory, loginService) { var url = ''; if (deviceDetector.isMobile() && !deviceDetector.isTablet()) { url = 'app/product/productlist.html'; } else { url = 'app/product/productlist.html'; } return $templateFactory.fromUrl(url); }, } }, ncyBreadcrumb: { label: 'Product' }, }).state('index.product.detail', { url: '/productdetail/:id', views: { "@index": { templateProvider: function(deviceDetector, $templateFactory, loginService) { var url = ''; if (deviceDetector.isMobile() && !deviceDetector.isTablet()) { url = 'app/product/productdetail.html'; } else { url = 'app/product/productdetail.html'; } return $templateFactory.fromUrl(url); } } }, ncyBreadcrumb: { label: '{{ProductName||"Detail"}}' }, }).state('index.store', { url: '/store', views: { "@index": { templateProvider: function(deviceDetector, $templateFactory, loginService) { var url = ''; if (deviceDetector.isMobile() && !deviceDetector.isTablet()) { url = 'app/product/market_list.html'; } else { url = 'app/product/market_list.html'; } return $templateFactory.fromUrl(url); } } }, ncyBreadcrumb: { label: '{{MarketName||"Market"}}' }, }).state('index.store.detail', { url: '/detail/:id', views: { "@index": { templateProvider: function(deviceDetector, $templateFactory, loginService) { var url = ''; if (deviceDetector.isMobile() && !deviceDetector.isTablet()) { url = 'app/product/market_detail.html'; } else { url = 'app/product/market_detail.html'; } return $templateFactory.fromUrl(url); } } }, ncyBreadcrumb: { label: '{{ProductName||"Detail"}}' }, }).state('index.searchproduct', { url: "/productsearch/:type/:key", views: { "@index": { templateUrl: 'app/product/search.html' } }, ncyBreadcrumb: { label: 'Product Search' }, //accessLevel: //accessLevels.users }).state('index.market', { url: '/market', views: { "@index": { templateProvider: function(deviceDetector, $templateFactory, loginService) { var url = ''; if (deviceDetector.isMobile() && !deviceDetector.isTablet()) { url = 'app/product/productlist.html'; } else { url = 'app/product/productlist.html'; } return $templateFactory.fromUrl(url); } } }, ncyBreadcrumb: { label: 'market' }, }) } ]);