クラス IgxIconComponent

階層

  • IgxIconComponent

実装

  • OnInit

コンストラクタ

constructor

プロパティ

active

active: boolean = true

active プロパティの無効化を許可する @Input プロパティ。デフォルトでクラスが適用されます。

<igx-icon [isActive]="false" fontSet="material" name="settings" color="blue"></igx-icon>

ariaHidden

ariaHidden: boolean = true

aria-hidden 属性を無効にできます。デフォルトでクラスが適用されます。

@ViewChild("MyIcon") public icon: IgxIconComponent;
constructor(private cdRef:ChangeDetectorRef) {}
ngAfterViewInit() {
   this.icon.ariaHidden = false;
   this.cdRef.detectChanges();
}

cssClass

cssClass: string = "igx-icon"

class.igx-icon の値を変更できます。デフォルト値は igx-icon です。

@ViewChild("MyIcon") public icon: IgxIconComponent;
constructor(private cdRef:ChangeDetectorRef) {}
ngAfterViewInit() {
   this.icon.cssClass = "";
   this.cdRef.detectChanges();
}

el

el: ElementRef

igx-icon コンポーネントの ElementRef プロパティ。

font

font: string

fontSet の値を設定する @Input プロパティ。デフォルトは、"material" です。

<igx-icon fontSet="material" name="settings" color="blue" [isActive]="false"></igx-icon>

iconColor

iconColor: string

アイコンの iconColor の変更を許可する @Input プロパティ。

<igx-icon color="blue" [isActive]="true" fontSet="material" name="settings" ></igx-icon>

iconName

iconName: string

アイコンの iconName の変更を許可する @Input プロパティ。 name を使用して iconName を設定できます。

<igx-icon name="question_answer" color="blue" [isActive]="true" fontSet="material"></igx-icon>

id

id: string = `igx-icon-${NEXT_ID++}`

id 属性の値を設定する @Input プロパティ。

<igx-icon id="igx-icon-1" fontSet="material" name="settings" color="blue" [isActive]="false"></igx-icon>

アクセサー

getActive

  • get getActive(): boolean
  • active プロパティの値を返すアクセサー。

    @ViewChild("MyIcon")
    public icon: IgxIconComponent;
    ngAfterViewInit() {
       let iconActive = this.icon.getActive;
    }

    返却 boolean

getFontSet

  • get getFontSet(): string
  • font プロパティの値を返すアクセサー。

    @ViewChild("MyIcon")
    public icon: IgxIconComponent;
    ngAfterViewInit() {
       let iconFont = this.icon.getFontSet;
    }

    返却 string

getIconColor

  • get getIconColor(): string
  • iconColor プロパティの逆値を返すアクセサー。

    @ViewChild("MyIcon")
    public icon: IgxIconComponent;
    ngAfterViewInit() {
       let iconColor = this.icon.getIconColor;
    }

    返却 string

getIconName

  • get getIconName(): string
  • iconName プロパティの値を返すアクセサー。

    @ViewChild("MyIcon")
    public icon: IgxIconComponent;
    ngAfterViewInit() {
       let iconName = this.icon.getIconName;
    }

    返却 string

getInactive

  • get getInactive(): boolean
  • inactive プロパティを返すアクセサー。

    @ViewChild("MyIcon")
    public icon: IgxIconComponent;
    ngAfterViewInit() {
       let iconActive = this.icon.getInactive;
    }

    返却 boolean

getSvgKey

  • get getSvgKey(): string
  • SVG 画像のキーを返すアクセサー。 アンダースコアで区切られた fontSet と iconName で構成されるキー。

    @ViewChild("MyIcon")
    public icon: IgxIconComponent;
    ngAfterViewInit() {
       let svgKey = this.icon.getSvgKey;
    }

    返却 string

template

  • get template(): TemplateRef<HTMLElement>
  • 明示的、暗黙、またはなしの合字を参照する TemplateRef を返すアクセサー。

    @ViewChild("MyIcon")
    public icon: IgxIconComponent;
    ngAfterViewInit() {
       let iconTemplate = this.icon.template;
    }

    返却 TemplateRef<HTMLElement>