UNPKG

angular-svg-icon

Version:

Angular 8 component for inlining SVGs allowing them to be easily styled with CSS.

36 lines (35 loc) 1.13 kB
import { ChangeDetectorRef, DoCheck, ElementRef, KeyValueDiffers, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core'; import { SvgIconRegistryService } from './svg-icon-registry.service'; export declare class SvgIconComponent implements OnInit, OnDestroy, OnChanges, DoCheck { private element; private differs; private renderer; private iconReg; private cdr; src: string; name: string; stretch: boolean; applyCss: boolean; svgStyle: { [key: string]: string; }; private svg; private icnSub; private differ; private _svgStyle; constructor(element: ElementRef, differs: KeyValueDiffers, renderer: Renderer2, iconReg: SvgIconRegistryService, cdr: ChangeDetectorRef); ngOnInit(): void; ngOnDestroy(): void; ngOnChanges(changeRecord: SimpleChanges): void; ngDoCheck(): void; private init; private initSvg; private destroy; private resetDiffer; private setSvg; private copyNgContentAttribute; private setNgContentAttribute; private stylize; private applyChanges; private setStyle; }