diff options
| author | Igor Minar | 2012-03-21 13:52:11 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-03-21 13:52:11 -0700 | 
| commit | 98e18a64aa6b4d7323b684f4d65ba2db30828762 (patch) | |
| tree | 0e280f13d42e45ed82d154882d286dd0d544de3e /docs/content/cookbook/form.ngdoc | |
| parent | 0a45bff4723002838a52fc7ed63ae46348eb5c47 (diff) | |
| download | angular.js-98e18a64aa6b4d7323b684f4d65ba2db30828762.tar.bz2 | |
docs(cookbook/form): fix the example
Closes #712
Diffstat (limited to 'docs/content/cookbook/form.ngdoc')
| -rw-r--r-- | docs/content/cookbook/form.ngdoc | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/docs/content/cookbook/form.ngdoc b/docs/content/cookbook/form.ngdoc index afb30e36..175a7275 100644 --- a/docs/content/cookbook/form.ngdoc +++ b/docs/content/cookbook/form.ngdoc @@ -20,7 +20,7 @@ allow a user to enter data.        $scope.zip = /^\d\d\d\d\d$/;        $scope.addContact = function() { -         $scope.user.contacts.push({type:'', value:''}); +         $scope.user.contacts.push({type:'email', value:''});        };        $scope.removeContact = function(contact) { @@ -34,16 +34,16 @@ allow a user to enter data.    </script>    <div ng-controller="FormController" class="example"> -    <label>Name:</label><br/> -    <input type="text" ng-model="user.name" required/> <br/><br/> +    <label>Name:</label><br> +    <input type="text" ng-model="user.name" required/> <br><br> -    <label>Address:</label><br/> -    <input type="text" ng-model="user.address.line1" size="33" required> <br/> -    <input type="text" ng-model="user.address.city" size="12" required>, -    <input type="text" ng-model="user.address.state" size="2" -           ng-pattern="state" required> +    <label>Address:</label><br> +    <input type="text" ng-model="user.address.line1" ng-model-instant size="33" required> <br> +    <input type="text" ng-model="user.address.city" ng-model-instant size="12" required>, +    <input type="text" ng-model="user.address.state" ng-model-instant +           ng-pattern="state" size="2" required>      <input type="text" ng-model="user.address.zip" size="5" -           ng-pattern="zip" required><br/><br/> +           ng-pattern="zip" required><br><br>      <label>Phone:</label>      [ <a href="" ng-click="addContact()">add</a> ] @@ -54,12 +54,12 @@ allow a user to enter data.          <option>pager</option>          <option>IM</option>        </select> -      <input type="text" ng-model="contact.value" required/> +      <input type="text" ng-model="contact.value" ng-model-instant required/>         [ <a href="" ng-click="removeContact(contact)">X</a> ]      </div>      <hr/>      Debug View: -    <pre>user={{user}}</pre> +    <pre>user={{user | json}}</pre>    </div>   </doc:source> | 
