Hello, I need to switch the class using the angular2 operator *ngIf
<i *ngIf="visible" [(ngClass)]="{{arrow}}"></i> <this line of code is not working properly
here is my code ts
private visible = true;
private i = 0;
private arrow = 'ic-v';
private showList(){
if(this.i == 0){
this.i = 1;
this.visible = false;
this.arrow = 'ic-v-up';
}
else
{
this.i = 0;
this.visible = true;
this.arrow = 'ic-v';
}
}
source
share