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

docs(guide/forms): add animated gifs for forms #9655

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/content/guide/forms.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,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 @@ -232,6 +234,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.
2 changes: 1 addition & 1 deletion lib/grunt/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ module.exports = {
rewrite: function(){
return function(req, res, next){
var REWRITE = /\/(guide|api|cookbook|misc|tutorial|error).*$/,
IGNORED = /(\.(css|js|png|jpg)$|partials\/.*\.html$)/,
IGNORED = /(\.(css|js|png|jpg|gif)$|partials\/.*\.html$)/,
match;

if (!IGNORED.test(req.url) && (match = req.url.match(REWRITE))) {
Expand Down