1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(function(){
var tempVersion = new Date().getTime();
angular.module("app.manage")
.config(['$stateProvider',"$urlRouterProvider",function ($stateProvider,$urlRouterProvider) {
var menu = "manage",html = ["app","auth","event","activityevent","profile","userinfo","usergroup","nopower"];
var nodetail = ["systemparam","event","profile","downloadurl"];
$stateProvider.state(menu,{
url:"",
templateUrl: '/template/menu/collect.html?r='+tempVersion,
controller: "collectCtrl"
});
html.forEach(function(h){
$stateProvider.state('collect.' + h,{
url:"/" + menu + "/" + h,
params:{
aid:null
},
views:{
"content@":{
templateUrl: "/template/" + menu + "/" + h + '.html?r='+tempVersion,
controller: h +"Ctrl"
}
}
});
if(nodetail.indexOf(h)==-1){
var v = h+"Detail";
$stateProvider.state('collect.' + v,{
url:"/" + menu + "/" + v,
params:{
aid:null
},
views:{
"content@":{
templateUrl: "/template/" + menu + "/" + v + '.html?r='+tempVersion,
controller: v +"Ctrl"
}
}
});
}
});
}]);
})();