Estou tendo um problema na validação do formulario, porem já consegui resolver mas sem entender o que acontece, vou enviar o código do erro:
zone.js:344 Unhandled Promise rejection: Template parse errors:
Can't bind to 'formGroup' since it isn't a known property of 'form'. ("<div class="container">
<h1 class="text-center">{{foto.titulo}}</h1>
<form [ERROR ->][formGroup]="meuForm" (submit)="cadastrar($event)" class="row">
<div class="col-md-6">
"): CadastroComponent@2:10
Can't bind to 'ngModel' since it isn't a known property of 'input'. (" formControlName="titulo"
name="titulo"
[ERROR ->][(ngModel)]="foto.titulo"
class="form-control"
autocomplete"): CadastroComponent@9:20
Can't bind to 'ngModel' since it isn't a known property of 'input'. (" formControlName="url"
name="url"
[ERROR ->][(ngModel)]="foto.url"
class="form-control"
autocomplete="o"): CadastroComponent@28:20
Can't bind to 'ngModel' since it isn't a known property of 'textarea'. ("escricao"
formControlName="descricao"
[ERROR ->][(ngModel)]="foto.descricao"
[value]="foto.descricao"
class"): CadastroComponent@40:20
No provider for ControlContainer ("<div class="container">
<h1 class="text-center">{{foto.titulo}}</h1>
[ERROR ->]<form [formGroup]="meuForm" (submit)="cadastrar($event)" class="row">
<div class="col-md"): CadastroComponent@2:4
No provider for NgControl (" <div class="form-group">
<label>Título</label>
[ERROR ->]<input
formControlName="titulo"
name="titulo"
"): CadastroComponent@6:20
No provider for NgControl (" <div class="form-group">
<label>URL</label>
[ERROR ->]<input
formControlName="url"
name="url"): CadastroComponent@25:20
No provider for NgControl (" <div class="form-group">
<label>Descrição</label>
[ERROR ->]<textarea
name="descricao"
formControlName="descricao" "): CadastroComponent@37:20 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:
Can't bind to 'formGroup' since it isn't a known property of 'form'. ("<div class="container">
<h1 class="text-center">{{foto.titulo}}</h1>
<form [ERROR ->][formGroup]="meuForm" (submit)="cadastrar($event)" class="row">
<div class="col-md-6">
"): CadastroComponent@2:10
Can't bind to 'ngModel' since it isn't a known property of 'input'. (" formControlName="titulo"
name="titulo"
[ERROR ->][(ngModel)]="foto.titulo"
class="form-control"
autocomplete")
ao adicionar isso: ReactiveFormsModule o problema é solucionado, mas queria saber o porque devo usar isso, se devo usar e o que faz, além de ele tambem trazer o value da descrição como undefined