Repository navigation
docs: fix wrong claims and examples in the forms guides - #71383
Open
erkamyaman wants to merge 1 commit into
Open
erkamyaman wants to merge 1 commit into
erkamyaman wants to merge 1 commit into
Conversation
Contributor
|
PR #71344 already includes some fixes! Thanks for the work on this. 馃檶 |
JeanMeche
reviewed
Oct 15, 2026
JeanMeche
reviewed
Oct 15, 2026
Several statements and snippets in the forms guides do not match the framework. `FormBuilder` has four factory methods, not three: `control()`, `group()`, `record()` and `array()`. The `FormArrayDirective` example uses `[formArray]` and `formControlName` but never imports `ReactiveFormsModule`. The dynamic forms tutorial says `QuestionControlService` collects several `FormGroup` instances and that the question component creates form groups. The service builds one `FormGroup` of `FormControl`s, and the component only receives it. The tutorial also calls the button "Submit", while the example renders "Save". The forms overview tests step through change detection, but the example specs only call `fixture.whenStable()`.
erkamyaman
force-pushed
the
docs-forms-fix-examples-and-claims
branch
from
October 15, 2026 19:39
12838fe to
92e4801
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several statements and snippets in the forms guides don't match the framework.
FormBuilderhas four factory methods, not three:control(),group(),record()andarray().FormArrayDirectiveexample uses[formArray]andformControlNamebut never importsReactiveFormsModule, so it doesn't work as written.a@bis a valid email. Onlya@triggers bothemail()andminLength(5).QuestionControlServicecollects severalFormGroupinstances and that the question component creates form groups. The service builds oneFormGroupofFormControls, and the component only receives it. The tutorial also calls the button "Submit", but the example renders "Save".await fixture.whenStable().viewProviderswithFormGroupDirectiveas a way to registerngModel.NgModelthrows when its parent is a reactive form directive (modelParentException), so I replaced that example withformControlNameor the standalone option.