Binding to scope variables
paulsperanza opened this issue · 2 comments
paulsperanza commented
I have this html
<paging page="1" page-size="12" total="{{pageResult.count}}" paging-action="pageChanged(page)"></paging>
This in the controller
$scope.pageResult = {
count: 0,
pageSize: 12,
pageCount: 0,
pages : [],
currentPage: 1
};
And I get this error
Syntax Error: Token '{' invalid key at column 2 of the expression [{{pageResult.count}}] starting at [{pageResult.count}}].
If I hard code a value for pageResult.count the pager works and my scope pageChanged funtion gets called.
Is there something wrong with using scope variables?
anteriovieira commented
Try
total="pageResult.count"
paulsperanza commented
Thanks!