-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavTabsController.js
More file actions
44 lines (36 loc) · 1.24 KB
/
Copy pathNavTabsController.js
File metadata and controls
44 lines (36 loc) · 1.24 KB
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
'use strict';
app.controller("NavTabsController", ['$scope','$state', function($scope,$state){
$scope.goto = function(tab, location){
var url,
template = 'main.';
switch(location){
case 'AreaManagement':
switch(tab){
case 'Area Management':
url = template + 'areaManagement.main';
break;
case 'Add Area':
url = template + 'areaManagement.addArea';
break;
case 'Edit Area':
url = template + 'areaManagement.editArea';
break;
}
break;
case 'Dashboard':
switch(tab){
case 'Dashboard':
url = template + 'dashboard.main';
break;
case 'Control Desk':
url = template + 'dashboard.controlDesk';
break;
case 'Area':
url = template + 'dashboard.area';
break;
}
break;
}
$state.go(url);
}
}]);