Avatar ·

Error "mat-form-field must contain a MatFormFieldControl" in Angular Material

Hello! I'm new to Angular and trying to create a simple form with an input field using Angular Material. I installed all dependencies, imported MatFormFieldModule and MatInputModule into my module, but when running the application I get an error in the console: **ERROR Error: mat-form-field must contain a MatFormFieldControl** Here is my component code (`login.component.ts`): ```typescript import { Component } from '@angular/core'; @Component({ selector: 'app-login', template: ` Email `, styleUrls: ['./login.component.css'] }) export class LoginComponent {} ``` And my module (`app.module.ts`): ```typescript import { NgMo