angular-ui / ui-utils

Deprecated collection of modules for angular
http://angular-ui.github.io
MIT License
1.43k stars 546 forks source link

Update $pending object on async validations #392

Closed ejmarino closed 9 years ago

ejmarino commented 9 years ago

When a custom validator returns a promise, uiValidation directive adds the validation key to ModelController's $pending object. When promise is resolve or rejected. $pending[key] is deleted automatically.

This allow to use $pending variable from the view to show transient messages while validation is taking place.