unserver-unify
Version:
44 lines (42 loc) • 1.43 kB
JavaScript
angular.module('bamboo.position', ['ui.router']).config(
['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
$stateProvider.state('index.position', {
url: '/position',
views: {
"@index": {
templateProvider: function(deviceDetector, $templateFactory, loginService) {
var url = '';
if (deviceDetector.isMobile() && !deviceDetector.isTablet()) {
url = 'app/position/list.html';
} else {
url = 'app/position/list.html';
}
return $templateFactory.fromUrl(url);
}
}
},
ncyBreadcrumb: {
label: 'Positions'
},
}).state('index.position.detail', {
url: '/detail/:id',
views: {
"@index": {
templateProvider: function(deviceDetector, $templateFactory, loginService) {
var url = '';
if (deviceDetector.isMobile() && !deviceDetector.isTablet()) {
url = 'app/position/mobiledetail.html';
} else {
url = 'app/position/detail.html';
}
return $templateFactory.fromUrl(url);
}
}
},
ncyBreadcrumb: {
label: 'Detail'
},
})
}
]);