New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: fix reactive forms language and example #22094
Conversation
bf4d403
to
2b04361
Compare
You can preview 2b04361 at https://pr22094-2b04361.ngbuilds.io/. |
2b04361
to
285ec66
Compare
You can preview 285ec66 at https://pr22094-285ec66.ngbuilds.io/. |
285ec66
to
d4d2a09
Compare
You can preview d4d2a09 at https://pr22094-d4d2a09.ngbuilds.io/. |
d4d2a09
to
c777faf
Compare
You can preview c777faf at https://pr22094-c777faf.ngbuilds.io/. |
c777faf
to
01bba32
Compare
You can preview 01bba32 at https://pr22094-01bba32.ngbuilds.io/. |
01bba32
to
c16fa3d
Compare
You can preview c16fa3d at https://pr22094-c16fa3d.ngbuilds.io/. |
c16fa3d
to
6310262
Compare
You can preview 6310262 at https://pr22094-6310262.ngbuilds.io/. |
6310262
to
a17ae91
Compare
You can preview a17ae91 at https://pr22094-a17ae91.ngbuilds.io/. |
a17ae91
to
61e0505
Compare
You can preview 61e0505 at https://pr22094-61e0505.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nits
@@ -106,15 +106,15 @@ You must wrap your test block in `async()` or `fakeAsync()` to | |||
avoid looking for values in the form that aren't there yet. | |||
With reactive forms, everything is available when you expect it to be. | |||
|
|||
### Which is better, reactive or template-driven? | |||
### Choosing reactive or template-driven forms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this language better, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
aio/content/guide/reactive-forms.md
Outdated
|
||
## Essential form classes | ||
This guide uses four fundamental classes to build a reactive forms: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: a reactive forms
-> a reactive form
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch. Fixed!
aio/content/guide/reactive-forms.md
Outdated
`FormControl`, `FormGroup`, and `FormArray`. | ||
It provides their common behaviors and properties, some of which are _observable_. | ||
It provides their common behaviors and properties, | ||
some of which are observable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand some of which are observable
. All of them are observable, no? Maybe it's supposed to be some of them are observables
? I think it should be removed bc it's confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Removed that phrase.
aio/content/guide/reactive-forms.md
Outdated
It corresponds to an HTML form control such as an input box or selector. | ||
[`FormControl`](api/forms/FormControl "API Reference: FormControl") | ||
tracks the value and validity status of an individual form control. | ||
It corresponds to an HTML form control such as an `<input>` or `<selector>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean <select>
here, I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha! Yes, thank you for catching that. Fixed. :)
this.rebuildForm(); | ||
} | ||
|
||
rebuildForm() { | ||
this.heroForm.reset({ | ||
name: this.hero.name | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't comment directly on it, but looks like there is still an ngOnChanges
reference in onSubmit
below (line 76)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhhh I see. Yes, changed to rebuildForm()
.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #2209 and #21968
What is the new behavior?
change to not call
ngOnChanges
directly, changes button from typereset
, and reworks text to reflect these changes. Also clarifies error map info.Does this PR introduce a breaking change?
Other information