This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
public/docs/ts/latest/guide Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -575,8 +575,8 @@ figure.image-display
575
575
trigger a form submit because of its type (`type="submit"`).
576
576
577
577
A "form submit" is useless at the moment.
578
- To make it useful, we'll update the `<form>` tag with another Angular directive, `NgSubmit`,
579
- and bind it to the `HeroFormComponent.submit()` method with an event binding
578
+ To make it useful, bind the `NgForm` directive's `ngSubmit` event property (in the `<form>` tag)
579
+ to the `HeroFormComponent.submit()` method:
580
580
+ makeExample('forms/ts/app/hero-form.component.html' , 'ngSubmit' )( format ="." )
581
581
582
582
:marked
@@ -671,7 +671,7 @@ figure.image-display
671
671
672
672
- An Angular HTML form template.
673
673
- A form component class with a `Component` decorator.
674
- - The `ngSubmit` directive for handling the form submission .
674
+ - Handling form submission by binding to the `NgForm.ngSubmit` event property .
675
675
- Template reference variables such as `#heroForm`, `#name` and `#power`.
676
676
- The `[(ngModel)]` syntax and a `name` attribute for two-way data binding, validation and change tracking.
677
677
- The reference variable’s `valid` property on input controls to check if a control is valid and show/hide error messages.
You can’t perform that action at this time.
0 commit comments