Observable that emits when an icon is successfully loaded through a HTTP request.
Returns the default font-family.
const defaultFamily = this.iconService.defaultFamily;
Sets the default font-family.
this.iconService.defaultFamily = 'svg-flags';
Adds an icon reference meta for an icon in a meta family. Executes only if no icon reference is found.
this.iconService.addIconRef('aruba', 'default', { name: 'aruba', family: 'svg-flags' });
Adds an SVG image to the cache. SVG source is its text.
this.iconService.addSvgIconFromText('simple', '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
<path d="M74 74h54v54H74" /></svg>', 'svg-flags');
Returns the icon reference meta for an icon in a given family.
const iconRef = this.iconService.getIconRef('aruba', 'default');
Creates a family to className relationship that is applied to the IgxIconComponent whenever that family name is used.
this.iconService.setFamily('material', { className: 'material-icons', type: 'liga' });
Similar to addIconRef, but always sets the icon reference meta for an icon in a meta family.
this.iconService.setIconRef('aruba', 'default', { name: 'aruba', family: 'svg-flags' });
Ignite UI for Angular Icon Service -
The Ignite UI Icon Service makes it easy for developers to include custom SVG images and use them with IgxIconComponent. In addition it could be used to associate a custom class to be applied on IgxIconComponent according to given font-family.
Example: