Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Pagination numPages doesn't get updated if totalItems not initialized #1104

Closed
sheanming opened this issue Oct 1, 2013 · 1 comment
Closed

Comments

@sheanming
Copy link

I'm not very experienced in Angular JS so I'm not completely sure what is the root of the issue.
It seems like numPages cannot get updated even inside the directive scope.

I inserted this line inside ui-bootstrap-tpls-0.6.0.js after line 1698
console.log(value, $scope.numPages, $scope)
The formal 2 are assigned the correct number but numPages inside $scope is still NaN

Plunker: http://plnkr.co/edit/42QW0X?p=preview
totalItems can be changed from the text field. Once the commented line is uncommented it starts working again.

@bekos
Copy link
Contributor

bekos commented Oct 1, 2013

@sheanming Thx for the report. This situation (undefined total-items) definitely needs to be handled by the directive. Will fix soon.

bekos added a commit to bekos/bootstrap that referenced this issue Oct 1, 2013
@bekos bekos closed this as completed in 8ecf93e Oct 2, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants