Open ikwijaya opened 6 years ago
thanks for great stuff man, i have issue when using your directive. in my case, i have 776 row in total, see below
and when i change page with > button, data cannot show after 140 datas, see below
and here my controller `app.controller('ADUsersCtrl', function(GlobalFactory,$timeout,$scope,$mdDialog,$filter){ 'use strict'; $scope.pageSize = 10; $scope.currentPage = 1; $scope.sort = function(keyname){ $scope.sortKey = keyname; $scope.reverse = !$scope.reverse; };
$scope.selected = []; $scope.limitOptions = [5,10,25,50,100]; $scope.options = { rowSelection: true, multiSelect: true, autoSelect: true, decapitate: false, largeEditDialog: false, boundaryLinks: false, limitSelect: false, pageSelect: false, onPaginate: true, }; $scope.query = { order: '', limit: 5, page: 1 }; $scope.list_type = [ {value: 512, text: 'Enable', icons: 'visibility' }, {value: 514, text: 'Disable', icons: 'visibility_off' }, {value: 544, text: 'Enable + Change Password', icons: null }, {value: 4096, text: 'WKS/SVR', icons: null }, {value: 66048, text: 'Enable + Never Expires', icons: null }, {value: 66050, text: 'Disable + Never Expires', icons: null }, {value: 262656, text: 'Smart Card + Logon Required', icons: null }, {value: 532480, text: 'DC', icons: null } ]; $scope.showType = function(code) { var selected = $filter('filter')($scope.list_type, {value: code}); return selected[0].text; }; $scope.getTypes = function () { return [512,514,544,4096,66048,66050,262656,532480]; }; $scope.delete = function(i,f){ var confirm = $mdDialog.confirm() .title('Would you like to delete ?') .targetEvent() .ok('Yes') .cancel('Cancel'); $mdDialog.show(confirm).then(function() { GlobalFactory.ad_delete(url('activedirectory/delete'),i,f).then(function(d){ if(d){ $scope.getData(); return d; } }); },function() { $scope.getData(); }); } $scope.update_uac = function(o,i,f){ var confirm = $mdDialog.confirm() .title('Would you like to '+ $scope.showType(o) + i +' ?') .targetEvent() .ok('Yes') .cancel('Cancel'); $mdDialog.show(confirm).then(function() { GlobalFactory.update(url('activedirectory/update'),o,i,f).then(function(d){ $scope.getData(); return d; }); },function() { $scope.getData(); }); } $scope.update = function(o,i,f){ GlobalFactory.update(url('activedirectory/update'),o,i,f).then(function(d){ $scope.getData(); return d; }); } $scope.getData = function(){ GlobalFactory.async(url('activedirectory/get_all_users')).then(function(d){ $scope.dataTable = d.table; }); }; $scope.toggleLimitOptions = function () { $scope.limitOptions = $scope.limitOptions ? undefined : [5, 10, 15]; }; $scope.refresh = function () { $scope.promise = $timeout(function () { $scope.getData(); }, 2000); }; $scope.removeFilter = function () { $scope.filter.show = false; $scope.query.filter = ''; }; /* Load data stuff */ $scope.getData();})`
may i wrong with my code, because any log or error show. sorry for my bad english ikw
+1
thanks for great stuff man, i have issue when using your directive. in my case, i have 776 row in total, see below
and when i change page with > button, data cannot show after 140 datas, see below
and here my controller `app.controller('ADUsersCtrl', function(GlobalFactory,$timeout,$scope,$mdDialog,$filter){ 'use strict';
$scope.pageSize = 10; $scope.currentPage = 1; $scope.sort = function(keyname){ $scope.sortKey = keyname; $scope.reverse = !$scope.reverse; };
may i wrong with my code, because any log or error show. sorry for my bad english ikw