mirror of
https://github.com/fergalmoran/dss.web.git
synced 2026-02-16 13:11:33 +00:00
51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
angular.module('dssWebApp')
|
|
.controller('UsersCtrl', function ($scope, $stateParams, UserModel, users) {
|
|
$scope.users = users;
|
|
$scope.initials = [
|
|
'A',
|
|
'B',
|
|
'C',
|
|
'D',
|
|
'E',
|
|
'F',
|
|
'G',
|
|
'H',
|
|
'I',
|
|
'J',
|
|
'K',
|
|
'L',
|
|
'M',
|
|
'N',
|
|
'O',
|
|
'P',
|
|
'Q',
|
|
'R',
|
|
'S',
|
|
'T',
|
|
'U',
|
|
'V',
|
|
'W',
|
|
'X',
|
|
'Y',
|
|
'Z'
|
|
];
|
|
console.log($stateParams);
|
|
if ($stateParams.initial !== undefined) {
|
|
$scope.currentInitial = $stateParams.initial;
|
|
} else {
|
|
$scope.currentInitial = '';
|
|
$scope.page = 1;
|
|
|
|
$scope.nextPage = function (e) {
|
|
$scope.page++;
|
|
UserModel.findAll({
|
|
page: $scope.page,
|
|
limit: 3
|
|
});
|
|
};
|
|
UserModel.bindAll(null, $scope, 'users');
|
|
}
|
|
});
|