Skip to content

[Docs] Form field's error solution is incomplete #8916

@williamBurgeson

Description

@williamBurgeson

At the bottom of https://material.angular.io/components/form-field/overview, there is a troubleshooting explanation for the error "Error: mat-form-field must contain a MatFormFieldControl".

I had a field along lines similar to the example

<mat-form-field>
    <input matInput placeholder="Input">
</mat-form-field>

and I had added the matInput directive to the input, however I still got the error.
In the end I also had to add the MatInputModule to my material module file, on top of obviously the MatFormFieldModule which is already documented.
I was on one of the RCs but have upgraded to 5.0 and this remains a requirement. Could you tweak the documentation to reflect this requirement,
thanks

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workarounddocsThis issue is related to documentationhelp wantedThe team would appreciate a PR from the community to address this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions