We are trying to build our own form-field-Components at our Company. We are trying to wrap material design\'s Components like this:
field:
If all of the main code structure/configuration answers above don't solve your issue, here's one more thing to check: make sure that you haven't in some way invalidated your tag.
For instance, I received the same mat-form-field must contain a MatFormFieldControl error message after accidentally putting a required attribute after a self-closing slash /, which effectively invalidated my . In other words, I did this (see the end of the input tag attributes):
wrong:
right:
If you make that mistake or something else to invalidate your , then you could get the mat-form-field must contain a MatFormFieldControl error. Anyway, this is just one more thing to look for as you're debugging.