From 42451d6ba92e9fe8b30b8eea39c22bf8fd4322e4 Mon Sep 17 00:00:00 2001 From: gc Date: Tue, 27 Dec 2016 23:43:01 +0800 Subject: [PATCH 1/2] docs(forms): ngSubmit isn't an Angular directive. ngSubmit just an output property. See: https://github.com/angular/angular/blob/master/modules/%40angular/forms/src/directives/ng_form.ts#L63-L64 --- public/docs/ts/latest/guide/forms.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade index de03784ef1..5a433540bd 100644 --- a/public/docs/ts/latest/guide/forms.jade +++ b/public/docs/ts/latest/guide/forms.jade @@ -575,7 +575,7 @@ figure.image-display trigger a form submit because of its type (`type="submit"`). A "form submit" is useless at the moment. - To make it useful, we'll update the `
` tag with another Angular directive, `NgSubmit`, + To make it useful, we'll update the `` tag with another output property, `ngSubmit`, and bind it to the `HeroFormComponent.submit()` method with an event binding +makeExample('forms/ts/app/hero-form.component.html', 'ngSubmit')(format=".") @@ -671,7 +671,7 @@ figure.image-display - An Angular HTML form template. - A form component class with a `Component` decorator. - - The `ngSubmit` directive for handling the form submission. + - The `ngSubmit` property for handling the form submission. - Template reference variables such as `#heroForm`, `#name` and `#power`. - The `[(ngModel)]` syntax and a `name` attribute for two-way data binding, validation and change tracking. - The reference variable’s `valid` property on input controls to check if a control is valid and show/hide error messages. From 02595dd1439a0a9cfc6320bf299e41722301bbb9 Mon Sep 17 00:00:00 2001 From: gc Date: Wed, 28 Dec 2016 09:07:11 +0800 Subject: [PATCH 2/2] docs(forms): ngSubmit is event property. directive's event (FormGroupDirective and NgForm) --- public/docs/ts/latest/guide/forms.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade index 5a433540bd..7972ca09d5 100644 --- a/public/docs/ts/latest/guide/forms.jade +++ b/public/docs/ts/latest/guide/forms.jade @@ -575,7 +575,7 @@ figure.image-display trigger a form submit because of its type (`type="submit"`). A "form submit" is useless at the moment. - To make it useful, we'll update the `` tag with another output property, `ngSubmit`, + To make it useful, we'll update the `` tag with another event property, `ngSubmit`, and bind it to the `HeroFormComponent.submit()` method with an event binding +makeExample('forms/ts/app/hero-form.component.html', 'ngSubmit')(format=".")