当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript MatIconRegistry.addSvgIcon方法代码示例

本文整理汇总了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'));
 }
开发者ID:KavvaP17,项目名称:Angular_Global_Mentoring_Program_2018_Task2,代码行数:32,代码来源:init-icons.service.ts

示例2: constructor

 constructor(
   private matIconRegistry: MatIconRegistry,
   private sanitizer: DomSanitizer,
   private appModeActions: AppModeActions
 ) {
    matIconRegistry.addSvgIcon('logo', sanitizer.bypassSecurityTrustResourceUrl('assets/img/logo.svg'));
 }
开发者ID:christinakayastha,项目名称:parkabler,代码行数:7,代码来源:header.component.ts

示例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');
 }
开发者ID:ravichandra480,项目名称:material2,代码行数:8,代码来源:icon-demo.ts

示例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'));

  }
开发者ID:intermadix,项目名称:XBMS-webapp,代码行数:18,代码来源:icon.service.ts

示例5: registerIcons

    registerIcons(icons :string[]) {

        for (let icon of icons) {

            this.iconRegistry.addSvgIcon(
                icon, 
                this.sanitizer.bypassSecurityTrustResourceUrl(`assets/${icon}.svg`));
        }
    }
开发者ID:grecosoft,项目名称:Sandbox,代码行数:9,代码来源:material.module.ts

示例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'));
    }
开发者ID:grecosoft,项目名称:NetFusion,代码行数:11,代码来源:area.module.ts

示例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"));
 }
开发者ID:GamesByEmail,项目名称:Games-Chess,代码行数:9,代码来源:app.module.ts

示例8: constructor

 constructor(
   iconRegistry: MatIconRegistry,
   sanitizer: DomSanitizer,
   public authService: AuthService,
   public media: ObservableMedia
 ) {
   iconRegistry.addSvgIcon(
     'lemon',
     sanitizer.bypassSecurityTrustResourceUrl('assets/img/icons/lemon.svg')
   )
 }
开发者ID:ershad1,项目名称:lemon-mart-1,代码行数:11,代码来源:app.component.ts

示例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');
 }
开发者ID:Nodarii,项目名称:material2,代码行数:12,代码来源:icon-demo.ts

示例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'));
 }
开发者ID:arpitsaan,项目名称:ShapeShifter,代码行数:17,代码来源:app.module.ts


注:本文中的@angular/material.MatIconRegistry.addSvgIcon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。