Adding class to ion-icon


#1

Does not work with html tags?


<ion-icon name="power" class="{{this.servidores.color}}" id="{{this.servidores.id}}" (click)="escolheServidor(servidores.id)"></ion-icon>

#2

Unclear what you are asking.


#3

Here is not working because it’s ion-icon tag, others tags works example:


#4

You should never write class="{{something}}" unless you are absolutely sure of what you are doing. Always write [ngClass]="something" instead.

You are blowing away all the icon font classes that make ion-icon work.