Search code examples
angularangular-materialangular13

I try to use Angular Form. But i got formControl error


I'm using angular 13

Form

1

Ts File

2

App Module

3

Error

4

5


Solution

  • You need to define the FormControl in your AboutComponent as follows:

    export class AboutComponent {
    
      name = new FormControl('');
    
      ...
    }
    

    For further details, please consult Reactive Forms.