デフォルトの font-family を返します。
const defaultFamily = this.iconService.defaultFamily;
デフォルトの font-family を設定します。
this.iconService.defaultFamily = 'svg-flags';
メタ ファミリのアイコンにアイコン参照メタを追加します。 アイコン参照が見つからない場合にのみ実行されます。
this.iconService.addIconRef('aruba', 'default', { name: 'aruba', family: 'svg-flags' });
キャッシュに SVG 画像を追加します。SVG ソースは url です。
this.iconService.addSvgIcon('aruba', '/assets/svg/country_flags/aruba.svg', 'svg-flags');
キャッシュに SVG 画像を追加します。SVG ソースはテキストです。
this.iconService.addSvgIconFromText('simple', '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
<path d="M74 74h54v54H74" /></svg>', 'svg-flags');
指定した font-family に関連するカスタム クラスがある場合は返します。
const familyClass = this.iconService.familyClassName('material');
特定のファミリのアイコンのアイコン参照メタを返します。
const iconRef = this.iconService.getIconRef('aruba', 'default');
キャッシュされた SVG 画像を文字列として返します。
const svgIcon = this.iconService.getSvgIcon('aruba', 'svg-flags');
指定した SVG 画像がキャッシュに存在するかどうかを返します。
const isSvgCached = this.iconService.isSvgIconCached('aruba', 'svg-flags');
ファミリ名が使用されるたびに IgxIconComponent に適用されるファミリと className の関係を作成します。
this.iconService.setFamily('material', { className: 'material-icons', type: 'liga' });
addIconRef に似ていますが、常にメタ ファミリ内のアイコンのアイコン参照メタを設定します。
this.iconService.setIconRef('aruba', 'default', { name: 'aruba', family: 'svg-flags' });
Ignite UI for Angular Icon Service -
Ignite UI Icon Service は、カスタム SVG 画像を IgxIconComponent で使用できます。 指定した font-family に従って IgxIconComponent に適用されるカスタム クラスに関連付けするために使用できます。
例: