Is there a simple way to change the style of an element when a bound property value changes, without storing a dedicated property in the component?
The elements I want to highlight are input form elements:
<tr field label="Lieu dépôt">
<select class="cellinput" #lieuDepotBon [(ngModel)]="rapport.LieuDepotBon" (ngModelChange)="changeRapport({LieuDepotBon:$event})">
<option [ngValue]="null"></option>
<option [ngValue]="i" *ngFor="let depotBonChoice of DepotBonInterventionValues; let i = index">{{DepotBonIntervention[i]}}</option>
</select>
</tr>
<tr field *ngIf="rapport.LieuDepotBon==DepotBonIntervention.Autre" label="Autre lieu">
<input class="cellinput" #autreLieuDepotBon [(ngModel)]="rapport.AutreLieuDepotBon" (ngModelChange)="changeRapport({AutreLieuDepotBon:autreLieuDepotBon.value})" />
</tr>
I have heard about special class styles set by Angular2 on elements with ngModel directive that might help achieve what I need, but I haven't been able to find more information about it.