本文整理汇总了TypeScript中@angular/material.MatIconRegistry.addSvgIconInNamespace方法的典型用法代码示例。如果您正苦于以下问题:TypeScript MatIconRegistry.addSvgIconInNamespace方法的具体用法?TypeScript MatIconRegistry.addSvgIconInNamespace怎么用?TypeScript MatIconRegistry.addSvgIconInNamespace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/material.MatIconRegistry
的用法示例。
在下文中一共展示了MatIconRegistry.addSvgIconInNamespace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(
private _iconRegistry: MatIconRegistry,
private _domSanitizer: DomSanitizer,
// _translate: TranslateService
) {
this._iconRegistry.addSvgIconInNamespace('assets', 'teradata',
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/teradata.svg'));
this._iconRegistry.addSvgIconInNamespace('assets', 'github',
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/github.svg'));
this._iconRegistry.addSvgIconInNamespace('assets', 'covalent',
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/covalent.svg'));
this._iconRegistry.addSvgIconInNamespace('assets', 'covalent-mark',
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/covalent-mark.svg'));
this._iconRegistry.addSvgIconInNamespace('assets', 'teradata-ux',
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/teradata-ux.svg'));
this._iconRegistry.addSvgIconInNamespace('assets', 'appcenter',
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/appcenter.svg'));
this._iconRegistry.addSvgIconInNamespace('assets', 'listener',
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/listener.svg'));
this._iconRegistry.addSvgIconInNamespace('assets', 'querygrid',
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/icons/querygrid.svg'));
// _translate.setDefaultLang('en');
// _translate.use('en');
}
示例2: ngOnInit
ngOnInit() {
this.matIconRegistry.addSvgIconInNamespace(
'adf',
'move_file',
this.sanitizer.bypassSecurityTrustResourceUrl(
'./assets/images/adf-move-file-24px.svg'
)
);
}