This allows you to disable the aria-hidden attribute. By default it's applied.
@ViewChild("MyIcon") public icon: IgxIconComponent;
constructor(private cdRef:ChangeDetectorRef) {}
ngAfterViewInit() {
this.icon.ariaHidden = false;
this.cdRef.detectChanges();
}
This allows you to change the value of class.igx-icon. By default it's igx-icon.
@ViewChild("MyIcon") public icon: IgxIconComponent;
constructor(private cdRef:ChangeDetectorRef) {}
ngAfterViewInit() {
this.icon.cssClass = "";
this.cdRef.detectChanges();
}
An ElementRef property of the igx-icon component.
An @Input property that sets the value of the fontSet. By default it's "material".
<igx-icon fontSet="material" color="blue" [isActive]="false">settings</igx-icon>
An @Input property that allows you to change the iconColor of the icon.
<igx-icon color="blue" [isActive]="true" fontSet="material">settings</igx-icon>
An @Input property that allows you to set the iconName of the icon.
The iconName can be set using the name property.
<igx-icon color="blue" [isActive]="true" fontSet="material">question_answer</igx-icon>
An @Input property that sets the value of the id attribute.
<igx-icon id="igx-icon-1" fontSet="material" color="blue" [isActive]="false">settings</igx-icon>
An accessor that returns the value of the active property.
@ViewChild("MyIcon")
public icon: IgxIconComponent;
ngAfterViewInit() {
let iconActive = this.icon.getActive;
}
An accessor that returns the value of the font property.
@ViewChild("MyIcon")
public icon: IgxIconComponent;
ngAfterViewInit() {
let iconFont = this.icon.getFontSet;
}
An accessor that returns the opposite value of the iconColor property.
@ViewChild("MyIcon")
public icon: IgxIconComponent;
ngAfterViewInit() {
let iconColor = this.icon.getIconColor;
}
An accessor that returns the value of the iconName property.
@ViewChild("MyIcon")
public icon: IgxIconComponent;
ngAfterViewInit() {
let iconName = this.icon.getIconName;
}
An accessor that returns inactive property.
@ViewChild("MyIcon")
public icon: IgxIconComponent;
ngAfterViewInit() {
let iconActive = this.icon.getInactive;
}
An accessor that returns the key of the SVG image. The key consists of the fontSet and the iconName separated by underscore.
@ViewChild("MyIcon")
public icon: IgxIconComponent;
ngAfterViewInit() {
let svgKey = this.icon.getSvgKey;
}
An accessor that returns a TemplateRef to explicit, svg or no ligature.
@ViewChild("MyIcon")
public icon: IgxIconComponent;
ngAfterViewInit() {
let iconTemplate = this.icon.template;
}
An @Input property that allows you to disable the
activeproperty. By default it's applied.<igx-icon [isActive]="false" fontSet="material" color="blue">settings</igx-icon>