angular.module('luticate') .controller('GroupsController', ['$scope', 'luticateAuthGroups', 'luticateAuthCache', function($scope, luticateAuthGroups, luticateAuthCache) { $scope.luTable = { columns: [ { name: "Name", width: 11, getValue: function (item) { return item.Name; } } ], canAdd: 'LU_GROUP_ADD', canDel: 'LU_GROUP_DEL', canEdit: function() { return true; }, getLoadPagePromise: function (page, perPage, query, promise) { return luticateAuthGroups.getAll({page: page, perPage: perPage, query: query}, promise); }, getDelPromise: function (id, promise) { return luticateAuthGroups.del({group_id: id}, promise); }, getEditController: function () { return "GroupEdit"; }, perPage: luticateAuthCache.getEffectiveSettingValue("LU_GROUPS_PER_PAGE") }; }]);