Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
docs(guide/forms): add ✨ animated gifs ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
btford authored and petebacondarwin committed Oct 19, 2014
1 parent 146440c commit 35e2a06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/content/guide/forms.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ bind only to specified list of events. I.e. `ng-model-options="{ updateOn: 'blur
and validate only after the control loses focus. You can set several events using a space delimited
list. I.e. `ng-model-options="{ updateOn: 'mousedown blur' }"`

<img alt="animation showing debounced input" src="img/guide/forms-update-on-blur.gif">

If you want to keep the default behavior and just add new events that may trigger the model update
and validation, add "default" as one of the specified events.

Expand Down Expand Up @@ -238,6 +240,8 @@ You can delay the model update/validation by using the `debounce` key with the
{@link ng.directive:ngModelOptions ngModelOptions} directive. This delay will also apply to
parsers, validators and model flags like `$dirty` or `$pristine`.

<img alt="animation showing debounced input" src="img/guide/forms-debounce.gif">

I.e. `ng-model-options="{ debounce: 500 }"` will wait for half a second since
the last content change before triggering the model update and form validation.

Expand Down
Binary file added docs/img/guide/forms-debounce.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/guide/forms-update-on-blur.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 35e2a06

Please sign in to comment.