UNPKG

unserver-unify

Version:

63 lines (60 loc) 2.01 kB
angular.module('bamboo.survey', ['ui.router']).config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { $stateProvider.state('index.survey', { url: '/surveys', views: { "@index": { //templateUrl : 'app/survey/detaillist.html' templateProvider: function(deviceDetector, $templateFactory, loginService) { var url = ''; if (deviceDetector.isMobile() && !deviceDetector.isTablet()) { url = 'app/survey/mobile_detaillist.html'; } else { url = 'app/survey/detaillist.html'; } return $templateFactory.fromUrl(url); }, } }, ncyBreadcrumb: { label: 'Survey' }, }).state('index.survey.detail', { url: '/detail/:id/:answered/:take', views: { "@index": { //templateUrl : 'app/survey/detail.html' templateProvider: function(deviceDetector, $templateFactory, loginService) { var url = ''; if (deviceDetector.isMobile() && !deviceDetector.isTablet()) { url = 'app/survey/mobiledetail.html'; } else { url = 'app/survey/detail.html'; } return $templateFactory.fromUrl(url); }, } }, ncyBreadcrumb: { label: '{{currentSurveyTitle}}' }, }).state('index.survey.result', { url: '/result/:id/:force', views: { "@index": { //templateUrl : 'app/survey/detaillist.html' templateProvider: function(deviceDetector, $templateFactory, loginService) { var url = ''; if (deviceDetector.isMobile() && !deviceDetector.isTablet()) { url = 'app/survey/mobile_detaillist.html'; } else { url = 'app/survey/showresult.html'; } return $templateFactory.fromUrl(url); }, } }, ncyBreadcrumb: { label: 'Result' }, }) }]);