I have problem with dir-pagination. I have multiple tables and I added to same dir-pagination attribute 'id'.
<tr dir-paginate="call in ( filterCalls = (calllRecords | filter :searchInput
| filter:{typeCall:cats || undefined} | filter:{created_by:createdBySort}
| filter:{deleted: myFilter(cats)} |
orderBy:orderByField:reverseSortArr[orderByField] |
itemsPerPage: itemsPerPage))" pagination-id="callPagin">
And I have this directive
<dir-pagination-controls boundary-links="true" pagination-id="callPagin" on-page-change="pageChangeHandelr(newPageNumber)"></dir-pagination-controls>
And I got this error:
Syntax Error: Token ':' is an unexpected token at column...
Why this happen?
EDIT: Angular controller:
$scope.getCallsRecords = function(){
$http({
method : "POST",
url : "/getCallRecords",
}).success(function(res){
$scope.calllRecords = res;
});
}
$scope.getCallsRecords();
$scope.getAssignments = function(deleted = 0){
$http({
method : "POST",
url : "/getAssignment"
}).success(function(res){
$scope.assignments = res;
});
}
$scope.getAssignments();
I solve it. I changed the dir-paginate attribute in tr tag. I removed the fillterCalls
so now this looke like this
<tr dir-paginate="call in calllRecords | filter :searchInput
| filter:{typeCall:cats || undefined}
| filter:{created_by:createdBySort}
| filter:{deleted: myFilter(cats)} |
orderBy: orderByField : reverseSortArr[orderByField]
| itemsPerPage: itemsPerPage"
pagination-id="callPagin">