diff options
| author | Misko Hevery | 2011-02-09 20:11:34 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-02-09 20:11:34 -0800 |
| commit | 0f19cd3625ca0fddb7ecb20f4f4c6fda7d01e2e4 (patch) | |
| tree | 85bc181668ee76baa59f2446e80a1b8b5b91dfbc | |
| parent | c1caf2560a39d3e9bb249877c8fd58464ad91f99 (diff) | |
| download | angular.js-0f19cd3625ca0fddb7ecb20f4f4c6fda7d01e2e4.tar.bz2 | |
corrected missbehaved example
| -rw-r--r-- | docs/cookbook.formadvanced.ngdoc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/cookbook.formadvanced.ngdoc b/docs/cookbook.formadvanced.ngdoc index e3242bdc..181dd5e9 100644 --- a/docs/cookbook.formadvanced.ngdoc +++ b/docs/cookbook.formadvanced.ngdoc @@ -9,7 +9,9 @@ detection, and preventing invalid form submission. <doc:example> <doc:source> <script> - function UserForm(){ + UserForm.$inject = ['$invalidWidgets']; + function UserForm($invalidWidgets){ + this.$invalidWidgets = $invalidWidgets; this.state = /^\w\w$/; this.zip = /^\d\d\d\d\d$/; this.master = { @@ -73,6 +75,8 @@ detection, and preventing invalid form submission. <doc:scenario> it('should enable save button', function(){ expect(element(':button:contains(Save)').attr('disabled')).toBeTruthy(); + input('form.name').enter(''); + expect(element(':button:contains(Save)').attr('disabled')).toBeTruthy(); input('form.name').enter('change'); expect(element(':button:contains(Save)').attr('disabled')).toBeFalsy(); element(':button:contains(Save)').click(); |
