Closed kvent closed 8 years ago
Remove the parentheses.
md-on-paginate="vm.onPaginate"
Explanation
I'm using two-way data binding for the callback functions,
onPaginate: '=?mdOnPaginate'
So you're essentially passing the function to the directive. The way you had it, the result of executing your function was passed to the directive, I think.
Thank you very much Daniel! It works!
Having the same trouble as @kvent ...
If I remove parenthesis from md-on-paginate
, nothing is called at all. If I put the parenthesis, it gets stuck into an infinite digest loop.
I am using ES6 and declaring controllers, services etc as classes
I am having the same problem.
Here is the code
<md-table-pagination md-limit="ic.query.limit" md-limit-options="ic.limitOptions" md-page="ic.query.page" md-total="{{ic.fullCount}}" md-page-select="ic.options.pageSelect" md-boundary-links="ic.options.boundaryLinks" md-on-paginate="ic.logPagination()"></md-table-pagination>
This is the controller
logPagination() {
console.log(this.query);
}
I can see that when i change the page the above function gets called mulitple times.
@daniel-nagy
I have removed parentheses.But still facing same issues.On md paginate method is called twice.
Hello to everyone. As the title says I am facing an issue with the md-on-paginate attribute. I am fairly new with angular so I don't clearly understand what is going wrong.
Here is my code:
//=================================================================
And I get multiple errors:
Any suggestions?
Thank you in advance.