I am using ui.bootstrap.pagination
I have a search box in a form on my page. I would like to disable the pagination control while someone is interacting with the search box, then re-enable once they have pressed "Search"
I would like to use the AngularJS form validation
ng-valid
ng-invalid
ng-pristine
ng-dirty
How would I tie the form validation with disabling the pagination?
I could not find out how to make the pagination control appear as disabled and disable input. I'm also using Bootstrap 3.
TIA
The support for directive ngDisabled was added to pagination directive, just an hour ago... ;)
You should be able to block the whole pagination element from outside. Lets say You have variable named blocked in Your scope that indicates when pagination should be blocked. You can then block it like this:
<pagination
total-items="totalItems"
ng-model="currentPage"
ng-change="pageChanged()"
ng-disabled="blocked"
></pagination>
Currently to use it, You shoud build newest version from official repo yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With