From 3137359c7d6bf277a257bb37a56d503bb2926c27 Mon Sep 17 00:00:00 2001 From: Vladislav Zarakovsky Date: Fri, 25 Dec 2015 13:45:08 +0300 Subject: [PATCH] docs(guides): Fix typos "-change" -> "Change" closes #605 --- .../forms/dart/lib/hero_form_component_ngmodelchange.html | 2 +- public/docs/dart/latest/guide/forms.jade | 8 ++++---- public/docs/js/latest/guide/forms.jade | 4 ++-- public/docs/ts/latest/guide/forms.jade | 4 ++-- public/docs/ts/latest/guide/template-syntax.jade | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/public/docs/_examples/forms/dart/lib/hero_form_component_ngmodelchange.html b/public/docs/_examples/forms/dart/lib/hero_form_component_ngmodelchange.html index d0b46d4a85..c8ebb80386 100644 --- a/public/docs/_examples/forms/dart/lib/hero_form_component_ngmodelchange.html +++ b/public/docs/_examples/forms/dart/lib/hero_form_component_ngmodelchange.html @@ -7,7 +7,7 @@ + (ngModelChange)="model.name = $event" > TODO: remove this: {{model.name}} diff --git a/public/docs/dart/latest/guide/forms.jade b/public/docs/dart/latest/guide/forms.jade index 9ffcce7b93..3e49db7797 100644 --- a/public/docs/dart/latest/guide/forms.jade +++ b/public/docs/dart/latest/guide/forms.jade @@ -342,13 +342,13 @@ figure.image-display :marked
The property binding should feel familiar. The event binding might seem strange. - The name `ngModel-change` specifies an event property of the `NgModel` directive. - When Angular sees a binding target in the form [(abc)], - it expects the `abc` directive to have an `abc` input property and an `abc-change` output property. + The name `ngModelChange` specifies an event property of the `NgModel` directive. + When Angular sees a binding target in the form [(x)], + it expects the `x` directive to have an `x` input property and an `xChange` output property. The other oddity is the template expression, `model.name = $event`. We're used to seeing an `$event` object coming from a DOM event. - The `ngModel-change` property doesn't produce a DOM event; it's an Angular `EventEmitter` + The `ngModelChange` property doesn't produce a DOM event; it's an Angular `EventEmitter` property that returns the input box value when it fires—which is precisely what we should assign to the model's `name` property. diff --git a/public/docs/js/latest/guide/forms.jade b/public/docs/js/latest/guide/forms.jade index 2cc3f0fcdc..5e66a8853a 100644 --- a/public/docs/js/latest/guide/forms.jade +++ b/public/docs/js/latest/guide/forms.jade @@ -330,8 +330,8 @@ figure.image-display The `ngModelChange` is not an `` element event. It is actually an event property of the `NgModel` directive. - When Angular sees a binding target in the form [(abc)], - it expects the `abc` directive to have an `abc` input property and an `abc-change` output property. + When Angular sees a binding target in the form [(x)], + it expects the `x` directive to have an `x` input property and an `xChange` output property. The other oddity is the template expression, `model.name = $event`. We're used to seeing an `$event` object coming from a DOM event. diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade index c378c47348..109b14d2cb 100644 --- a/public/docs/ts/latest/guide/forms.jade +++ b/public/docs/ts/latest/guide/forms.jade @@ -328,8 +328,8 @@ figure.image-display The `ngModelChange` is not an `` element event. It is actually an event property of the `NgModel` directive. - When Angular sees a binding target in the form [(abc)], - it expects the `abc` directive to have an `abc` input property and an `abc-change` output property. + When Angular sees a binding target in the form [(x)], + it expects the `x` directive to have an `x` input property and an `xChange` output property. The other oddity is the template expression, `model.name = $event`. We're used to seeing an `$event` object coming from a DOM event. diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 4618201d58..0336a86d4a 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -651,7 +651,7 @@ code-example(format="", language="html"). Internally, Angular maps the term, `ngModel`, to an `ngModel` input property and an `ngModelChange` output property. That’s a specific example of a more general pattern in which it matches `[(x)]` to an `x` input property - for Property Binding and an `x-change` output property for Event Binding. + for Property Binding and an `xChange` output property for Event Binding. We can write our own two-way binding directive that follows this pattern if we're ever in the mood to do so. :marked