本文整理汇总了TypeScript中@angular/material.MatIconRegistry.addSvgIcon方法的典型用法代码示例。如果您正苦于以下问题:TypeScript MatIconRegistry.addSvgIcon方法的具体用法?TypeScript MatIconRegistry.addSvgIcon怎么用?TypeScript MatIconRegistry.addSvgIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/material.MatIconRegistry
的用法示例。
在下文中一共展示了MatIconRegistry.addSvgIcon方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: init
public init() {
this.iconRegistry.addSvgIcon(
'add',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/note_add_48px.svg'));
this.iconRegistry.addSvgIcon(
'edit',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/edit_48px.svg'));
this.iconRegistry.addSvgIcon(
'delete',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/delete_forever_48px.svg'));
this.iconRegistry.addSvgIcon(
'calendar',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/calendar.svg'));
this.iconRegistry.addSvgIcon(
'time',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/time.svg'));
this.iconRegistry.addSvgIcon(
'search',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/search.svg'));
this.iconRegistry.addSvgIcon(
'title',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/title.svg'));
this.iconRegistry.addSvgIcon(
'logout',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/logout.svg'));
this.iconRegistry.addSvgIcon(
'arrow_down',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/arrow_down.svg'));
this.iconRegistry.addSvgIcon(
'user',
this.sanitizer.bypassSecurityTrustResourceUrl('assets/icons/user.svg'));
}
示例2: constructor
constructor(
private matIconRegistry: MatIconRegistry,
private sanitizer: DomSanitizer,
private appModeActions: AppModeActions
) {
matIconRegistry.addSvgIcon('logo', sanitizer.bypassSecurityTrustResourceUrl('assets/img/logo.svg'));
}
示例3: constructor
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');
}
示例4: constructor
constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer) {
iconRegistry.addSvgIcon(
'linkedin',
sanitizer.bypassSecurityTrustResourceUrl('./linkedin.svg'));
iconRegistry.addSvgIcon(
'twitter',
sanitizer.bypassSecurityTrustResourceUrl('./twitter.svg'));
iconRegistry.addSvgIcon(
'facebook',
sanitizer.bypassSecurityTrustResourceUrl('./facebook.svg'));
iconRegistry.addSvgIcon(
'instagram',
sanitizer.bypassSecurityTrustResourceUrl('./instagram.svg'));
}
示例5: registerIcons
registerIcons(icons :string[]) {
for (let icon of icons) {
this.iconRegistry.addSvgIcon(
icon,
this.sanitizer.bypassSecurityTrustResourceUrl(`assets/${icon}.svg`));
}
}
示例6: constructor
constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer) {
iconRegistry.addSvgIcon('hal-viewer', sanitizer.bypassSecurityTrustResourceUrl('app/areas/HalViewer/assets/img/ic_beenhere_white_24px.svg'));
iconRegistry.addSvgIcon('nav-notifications', sanitizer.bypassSecurityTrustResourceUrl('app/areas/HalViewer/assets/img/ic_alarm_white_24px.svg'));
iconRegistry.addSvgIcon('nav-settings', sanitizer.bypassSecurityTrustResourceUrl('app/areas/HalViewer/assets/img/ic_settings_white_24px.svg'));
iconRegistry.addSvgIcon('nav-connections', sanitizer.bypassSecurityTrustResourceUrl('app/areas/HalViewer/assets/img/ic_location_on_white_24px.svg'));
iconRegistry.addSvgIcon('nav-environments', sanitizer.bypassSecurityTrustResourceUrl('app/areas/HalViewer/assets/img/ic_language_white_24px.svg'));
iconRegistry.addSvgIcon('nav-entries', sanitizer.bypassSecurityTrustResourceUrl('app/areas/HalViewer/assets/img/ic_image_aspect_ratio_white_24px.svg'));
iconRegistry.addSvgIcon('nav-resources', sanitizer.bypassSecurityTrustResourceUrl('app/areas/HalViewer/assets/img/ic_group_work_white_24px.svg'));
iconRegistry.addSvgIcon('view-properties', sanitizer.bypassSecurityTrustResourceUrl('app/areas/HalViewer/assets/img/ic_list_white_24px.svg'));
}
示例7: constructor
constructor(domSanitizer: DomSanitizer, matIconRegistry: MatIconRegistry) {
matIconRegistry.addSvgIcon("warning", domSanitizer.bypassSecurityTrustResourceUrl("../assets/icons/alert/baseline-warning-24px.svg"));
matIconRegistry.addSvgIcon("info", domSanitizer.bypassSecurityTrustResourceUrl("../assets/icons/action/baseline-info-24px.svg"));
matIconRegistry.addSvgIcon("flag", domSanitizer.bypassSecurityTrustResourceUrl("../assets/icons/content/baseline-flag-24px.svg"));
matIconRegistry.addSvgIcon("outlined_flag", domSanitizer.bypassSecurityTrustResourceUrl("../assets/icons/content/baseline-outlined_flag-24px.svg"));
matIconRegistry.addSvgIcon("ok", domSanitizer.bypassSecurityTrustResourceUrl("../assets/icons/action/baseline-check_circle-24px.svg"));
matIconRegistry.addSvgIcon("cancel", domSanitizer.bypassSecurityTrustResourceUrl("../assets/icons/navigation/baseline-cancel-24px.svg"));
matIconRegistry.addSvgIcon("menu", domSanitizer.bypassSecurityTrustResourceUrl("../assets/icons/navigation/baseline-menu-24px.svg"));
}
示例8: constructor
constructor(
iconRegistry: MatIconRegistry,
sanitizer: DomSanitizer,
public authService: AuthService,
public media: ObservableMedia
) {
iconRegistry.addSvgIcon(
'lemon',
sanitizer.bypassSecurityTrustResourceUrl('assets/img/icons/lemon.svg')
)
}
示例9: constructor
constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer) {
iconRegistry
.addSvgIcon('thumb-up',
sanitizer.bypassSecurityTrustResourceUrl('/icon/assets/thumbup-icon.svg'))
.addSvgIconLiteral('bike',
sanitizer.bypassSecurityTrustHtml(BIKE_ICON))
.addSvgIconSetInNamespace('core',
sanitizer.bypassSecurityTrustResourceUrl('/icon/assets/core-icon-set.svg'))
.addSvgIconSetLiteralInNamespace('core-inline',
sanitizer.bypassSecurityTrustHtml(INLINE_ICON_SET))
.registerFontClassAlias('fontawesome', 'fa');
}
示例10: constructor
constructor(matIconRegistry: MatIconRegistry, private readonly sanitizer: DomSanitizer) {
matIconRegistry
// Logo.
.addSvgIcon('shapeshifter', this.trustUrl('assets/shapeshifter.svg'))
// Icons.
.addSvgIcon('addlayer', this.trustUrl('assets/icons/addlayer.svg'))
.addSvgIcon('autofix', this.trustUrl('assets/icons/autofix.svg'))
.addSvgIcon('contribute', this.trustUrl('assets/icons/contribute.svg'))
.addSvgIcon('reverse', this.trustUrl('assets/icons/reverse.svg'))
.addSvgIcon('animation', this.trustUrl('assets/icons/animation.svg'))
.addSvgIcon('collection', this.trustUrl('assets/icons/collection.svg'))
.addSvgIcon('animationblock', this.trustUrl('assets/icons/animationblock.svg'))
.addSvgIcon('mask', this.trustUrl('assets/icons/clippathlayer.svg'))
.addSvgIcon('group', this.trustUrl('assets/icons/grouplayer.svg'))
.addSvgIcon('path', this.trustUrl('assets/icons/pathlayer.svg'))
.addSvgIcon('vector', this.trustUrl('assets/icons/vectorlayer.svg'));
}