|
@@ -11,11 +11,12 @@ angular.module('luticate')
|
11
|
11
|
groups: ['userList']
|
12
|
12
|
};
|
13
|
13
|
|
14
|
|
- $scope.loadUsers = function()
|
|
14
|
+ $scope.loadPage = function(page)
|
15
|
15
|
{
|
16
|
16
|
luticateAuthUsers.getAll({page: $scope.page, perPage: $scope.perPage}, promiseUsers)
|
17
|
17
|
.then(function(users)
|
18
|
18
|
{
|
|
19
|
+ $scope.page = page;
|
19
|
20
|
$scope.users = users;
|
20
|
21
|
$scope.pages = [];
|
21
|
22
|
var start = Math.max(0, $scope.page - 5);
|
|
@@ -28,11 +29,5 @@ angular.module('luticate')
|
28
|
29
|
});
|
29
|
30
|
};
|
30
|
31
|
|
31
|
|
- $scope.goToPage = function(page)
|
32
|
|
- {
|
33
|
|
- $scope.page = page;
|
34
|
|
- $scope.loadUsers();
|
35
|
|
- };
|
36
|
|
-
|
37
|
|
- $scope.loadUsers();
|
|
32
|
+ $scope.loadPage($scope.page);
|
38
|
33
|
}]);
|