valueAccessor is null in NgModel · Issue #69421 · angular/angular · GitHub
Skip to content

valueAccessor is null in NgModel #69421

Description

@kemsky

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

Yes

Description

We are using template driven forms and until now we could get valueAccessor from injected NgModel.

    @ContentChildren(NgModel, {descendants: true})
    public inputs: QueryList<NgModel>;

    public ngAfterContentInit(): void {
         // array of nulls
         const accessors = this.inputs.map((control) => control.valueAccessor);
    }
Image

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw


Please provide the environment you discovered this bug in (run ng version)

Angular CLI       : 22.0.0
Angular           : 22.0.0
Node.js           : 24.16.0
Package Manager   : yarn 4.13.0
Operating System  : linux x64

┌───────────────────────────────────┬───────────────────┬───────────────────┐
│ Package                           │ Installed Version │ Requested Version │
├───────────────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build                    │ 22.0.0            │ 22.0.0            │
│ @angular/cdk                      │ 22.0.0            │ 22.0.0            │
│ @angular/cli                      │ 22.0.0            │ 22.0.0            │
│ @angular/common                   │ 22.0.0            │ 22.0.0            │
│ @angular/compiler                 │ 22.0.0            │ 22.0.0            │
│ @angular/compiler-cli             │ 22.0.0            │ 22.0.0            │
│ @angular/core                     │ 22.0.0            │ 22.0.0            │
│ @angular/elements                 │ 22.0.0            │ 22.0.0            │
│ @angular/forms                    │ 22.0.0            │ 22.0.0            │
│ @angular/language-service         │ 22.0.0            │ 22.0.0            │
│ @angular/material                 │ 22.0.0            │ 22.0.0            │
│ @angular/platform-browser         │ 22.0.0            │ 22.0.0            │
│ @angular/platform-browser-dynamic │ 22.0.0            │ 22.0.0            │
│ @angular/router                   │ 22.0.0            │ 22.0.0            │
│ rxjs                              │ 7.8.2             │ 7.8.2             │
│ typescript                        │ 6.0.3             │ 6.0.3             │
│ vitest                            │ 4.1.8             │ 4.1.8             │
│ webpack                           │ 5.107.2           │ 5.107.2           │
│ zone.js                           │ 0.16.2            │ 0.16.2            │
└───────────────────────────────────┴───────────────────┴───────────────────┘

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: formsgemini-triagedLabel noting that an issue has been triaged by geminineeds reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions