diff --git a/src/directives/pagination/dirPagination.js b/src/directives/pagination/dirPagination.js index a1a7265..5a035eb 100644 --- a/src/directives/pagination/dirPagination.js +++ b/src/directives/pagination/dirPagination.js @@ -132,7 +132,7 @@ idDefinedInFilter = !!expression.match(/(\|\s*itemsPerPage\s*:[^|]*:[^|]*)/); if (paginationId !== DEFAULT_ID && !idDefinedInFilter) { - repeatExpression = expression.replace(/(\|\s*itemsPerPage\s*:\s*[^|\s]*)/, "$1 : '" + paginationId + "'"); + repeatExpression = expression.replace(/(\|\s*itemsPerPage\s*:\s*[^|\s\)]*)(\)*)/, "$1 : '" + paginationId + "' $2"); } else { repeatExpression = expression; }