Skip to content

docs: fix wrong claims and examples in the forms guides - #71383

Open
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:docs-forms-fix-examples-and-claims
Open

erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:docs-forms-fix-examples-and-claims

Conversation

@erkamyaman

Copy link
Copy Markdown
Contributor

Several statements and snippets in the forms guides don't 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, so it doesn't work as written.
  • In the signal forms validation guide, a@b is a valid email. Only a@ triggers both email() and minLength(5).
  • The dynamic forms tutorial says QuestionControlService collects several FormGroup instances and that the question component creates form groups. The service builds one FormGroup of FormControls, and the component only receives it. The tutorial also calls the button "Submit", but the example renders "Save".
  • The forms overview tests step through change detection, but the example specs only call await fixture.whenStable().
  • The NG01354 page shows viewProviders with FormGroupDirective as a way to register ngModel. NgModel throws when its parent is a reactive form directive (modelParentException), so I replaced that example with formControlName or the standalone option.

@pullapprove
pullapprove Bot requested a review from josephperrott October 15, 2026 16:11
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Oct 15, 2026
@ngbot ngbot Bot added this to the Backlog milestone Oct 15, 2026
@MeAkib

MeAkib commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

PR #71344 already includes some fixes! Thanks for the work on this. 馃檶

Comment thread adev/src/content/guide/forms/overview.md
Comment thread adev/src/content/reference/errors/NG01354.md Outdated
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
erkamyaman force-pushed the docs-forms-fix-examples-and-claims branch from 12838fe to 92e4801 Compare October 15, 2026 19:39
@erkamyaman
erkamyaman requested a review from JeanMeche October 15, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants