-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontroller.js
51 lines (38 loc) · 1.14 KB
/
controller.js
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
45
46
47
48
49
50
51
app.controller('publicListController', function ($scope, $log, crestService) {
// console.log($route.current.params.url);
crestService.getData(null)
.success(function (data) {
$scope.links = data;
});
$scope.loadData = function () {
var rhref = this.link.href;
if (undefined === rhref) {
console.log(this.link);
return;
}
else {
crestService.getData(rhref)
.success(function (data) {
$scope.links = data;
});
}
};
});
app.controller('regionsController', function ($scope, $http) {
$http.get("/data/regions.json")
.success(function (data) {
$scope.data = data.items;
});
});
app.controller('navController', function ($scope,$log,crestService) {
$scope.goAuth = function () {
// $log.debug(11);
// $log.debug();
crestService.redirectSSO();
};
});
app.controller('authController', function ($scope, $http, $routeParams, $log) {
var code = $routeParams.code;
$log.log(code);
localStorage.setItem("code", code);
});