UNPKG

ipsos-components

Version:

Material Design components for Angular

31 lines (28 loc) 1.03 kB
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {Component, ViewEncapsulation} from '@angular/core'; import {DomSanitizer} from '@angular/platform-browser'; import {MatIconRegistry} from '@angular/material'; @Component({ moduleId: module.id, selector: 'mat-icon-demo', templateUrl: 'icon-demo.html', styleUrls: ['icon-demo.css'], encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, }) export class IconDemo { constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer) { iconRegistry .addSvgIcon('thumb-up', sanitizer.bypassSecurityTrustResourceUrl('/icon/assets/thumbup-icon.svg')) .addSvgIconSetInNamespace('core', sanitizer.bypassSecurityTrustResourceUrl('/icon/assets/core-icon-set.svg')) .registerFontClassAlias('fontawesome', 'fa'); } }