I'm trying a 'Can not read property' reason_social 'of undefined' error when calling a ngModel in my html.
I created an interface like this:
export interface IEmpresas {
nome_fantasia : string;
razao_social : string;
cnpj : string;
}
In my component, I instantiated the interface and created a variable with the type of my interface.
...
private empresa : IEmpresas;
...
and then, I call ngModel in html
<input type="text" [(ngModel)]="empresa.razao_social" id="razao_social">