0
Hello, I have the following element:
Product.description_b2w.description
Sometimes that description does not exist in this product, so when I try to apply ngModel and *ngIf in it I get:
Cannot read Property 'Description' of null
This is my template:
<textarea *ngIf="produto.descricao_b2w.descricao !== null" rows="4" [(ngModel)]="produto.descricao_b2w.descricao" readonly type="text" name="descricaob2w" id="descricaob2w{{i}}" class="form-control">
I tried Elvis in a few different ways, but none managed to reach my goal, ngModel can’t find the description because it doesn’t really exist in the object, it only exists sometimes.