Angular can't understand property with '-' symbol in ngModel. I get error in the following input inside ngModel. How can i make this work without changing property name?
<ng-container matColumnDef="DRA0">
<th mat-header-cell *matHeaderCellDef> DRA-0 </th>
<td mat-cell *matCellDef="let element">
<input autocomplete="off" [(ngModel)]='element.DRA-0' />
</td>
</ng-container>
Simply wrap it with square brackets.
<input autocomplete="off" [(ngModel)]="element['DRA-0']" />