UNPKG

unserver-unify

Version:

47 lines 1.67 kB
angular.module('bamboo.cfcourse', ['ui.router']).config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { $stateProvider.state('index.cfcourses', { url: "/cfcourses", views: { "@index": { templateProvider : function (deviceDetector, $templateFactory, loginService) { var url = ''; if( deviceDetector.isMobile() && !deviceDetector.isTablet() ) { url = 'app/cfcourse/gsx/mobilelist.html'; }else if(loginService.subDomain == 'gsx'){ url = 'app/cfcourse/gsx/list.html'; }else{ url = 'app/cfcourse/list.html'; } return $templateFactory.fromUrl(url); }, // templateUrl: 'app/cfcourse/list.html' } }, ncyBreadcrumb: { label: 'Pre-book Courses' }, //accessLevel: //accessLevels.users }).state('index.cfcourses.info', { url: "/info/:cid", views: { "@index": { templateProvider : function (deviceDetector, $templateFactory, loginService) { var url = ''; if( deviceDetector.isMobile() && !deviceDetector.isTablet() ) { url = 'app/cfcourse/gsx/mobileinfo.html'; }else if(loginService.subDomain == 'gsx'){ url = 'app/cfcourse/gsx/info.html'; }else{ url = 'app/cfcourse/info.html'; } return $templateFactory.fromUrl(url); }, //templateUrl: 'app/cfcourse/info.html' } }, ncyBreadcrumb: { label: '{{lcoursename||"Info"}}' }, //accessLevel: //accessLevels.users }); }]);