diff options
| author | Misko Hevery | 2011-01-10 13:55:08 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-01-10 13:55:08 -0800 |
| commit | c3e32f1a51d91cbb89b575995dc782a114196db1 (patch) | |
| tree | cff112fc57da57237b4a5fc8d56e5027ea735c0f | |
| parent | 4f22d6866c052fb5b770ce4f377cecacacd9e6d8 (diff) | |
| download | angular.js-c3e32f1a51d91cbb89b575995dc782a114196db1.tar.bz2 | |
fix broken e2e test due to $window no longer published
| -rw-r--r-- | src/validators.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/validators.js b/src/validators.js index e9a5feb9..7d115518 100644 --- a/src/validators.js +++ b/src/validators.js @@ -339,14 +339,18 @@ extend(angularValidator, { * * @example * <script> - * function myValidator(inputToValidate, validationDone) { - * setTimeout(function(){ - * validationDone(inputToValidate.length % 2); - * }, 500); + * function MyCntl(){ + * this.myValidator = function (inputToValidate, validationDone) { + * setTimeout(function(){ + * validationDone(inputToValidate.length % 2); + * }, 500); + * } * } * </script> * This input is validated asynchronously: - * <input name="text" ng:validate="asynchronous:$window.myValidator"> + * <div ng:controller="MyCntl"> + * <input name="text" ng:validate="asynchronous:myValidator"> + * </div> * * @scenario * it('should change color in delayed way', function(){ |
