Open tb opened 8 years ago
Ok, I solved it within wrapper class:
export default angular.module('app.services.myTable', [
'ngTable'
])
.factory('myTable', function (ngTableParams) {
return class myTable extends ngTableParams {
constructor(config={}) {
super(config);
}
get perPage() {
return this.count();
}
set perPage(count) {
this.count(count);
}
}
});
This allows following code in pager.html template:
<div ng-if="params.settings().counts.length && params.data.length > 1" class="ng-table-counts float-right">
<select ng-options="option for option in params.settings().counts" ng-model="params.perPage"></select>
</div>
I need to use select for per page count. How can I edit the count with ng-model?