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


TypeScript material.MdIconRegistry类代码示例

本文整理汇总了TypeScript中@angular/material.MdIconRegistry的典型用法代码示例。如果您正苦于以下问题:TypeScript MdIconRegistry类的具体用法?TypeScript MdIconRegistry怎么用?TypeScript MdIconRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了MdIconRegistry类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

export const loadSvgResources = (ir: MdIconRegistry, ds: DomSanitizer) => {
    const imgDir = 'assets/img';
    const sidebarDir = `${imgDir}/sidebar`;
    const dayDir = `${imgDir}/days`;
    const avatarDir = `${imgDir}/avatar`;
    const iconDir = `${imgDir}/icons`;

    ir.addSvgIconSetInNamespace('avatars', ds.bypassSecurityTrustResourceUrl(`${avatarDir}/avatars.svg`));
    ir.addSvgIcon('unassigned', ds.bypassSecurityTrustResourceUrl(`${avatarDir}/unassigned.svg`));
    ir.addSvgIcon('day', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/day.svg`));
    ir.addSvgIcon('week', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/week.svg`))
    ir.addSvgIcon('month', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/month.svg`));
    ir.addSvgIcon('project', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/project.svg`));
    ir.addSvgIcon('projects', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/projects.svg`));
    ir.addSvgIcon('move', ds.bypassSecurityTrustResourceUrl(`${iconDir}/move.svg`));
    ir.addSvgIcon('add', ds.bypassSecurityTrustResourceUrl(`${iconDir}/add.svg`));
    ir.addSvgIcon('delete', ds.bypassSecurityTrustResourceUrl(`${iconDir}/delete.svg`));
    const days = [
        1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
        11, 12, 13, 14, 15, 16, 17, 18, 
        19, 20, 21, 22, 23, 24, 25, 26, 
        27, 28, 29, 30, 31
    ]
    days.forEach(d => ir.addSvgIcon(`day${d}`, ds.bypassSecurityTrustResourceUrl(`${dayDir}/day${d}.svg`)));
}
开发者ID:zichenma,项目名称:prodinator,代码行数:25,代码来源:svg.util.ts

示例2: constructor

 constructor(mdIconRegistry: MdIconRegistry, sanitizer: DomSanitizer) {
   mdIconRegistry
       .addSvgIcon('thumb-up',
           sanitizer.bypassSecurityTrustResourceUrl('/icon/assets/thumbup-icon.svg'))
       .addSvgIconSetInNamespace('core',
           sanitizer.bypassSecurityTrustResourceUrl('/icon/assets/core-icon-set.svg'))
       .registerFontClassAlias('fontawesome', 'fa');
 }
开发者ID:Chintuz,项目名称:material2,代码行数:8,代码来源:icon-demo.ts

示例3:

export const loadSvgResources = (ir: MdIconRegistry, ds: DomSanitizer) => {
  const imgDir = 'assets/img';
  const sidebarDir = `${imgDir}/sidebar`;
  const avatarDir = `${imgDir}/avatar`;
  ir.addSvgIcon('day', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/day.svg`));
  ir.addSvgIcon('month', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/month.svg`));
  ir.addSvgIcon('project', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/project.svg`));
  ir.addSvgIcon('projects', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/projects.svg`));
  ir.addSvgIcon('week', ds.bypassSecurityTrustResourceUrl(`${sidebarDir}/week.svg`));
  ir.addSvgIconSetInNamespace('avatars', ds.bypassSecurityTrustResourceUrl(`${avatarDir}/avatars.svg`));
}
开发者ID:duangangqiang,项目名称:enterprise-platform,代码行数:11,代码来源:svg.util.ts

示例4: constructor

 constructor(iconRegistry: MdIconRegistry, sanitizer: DomSanitizer) {
   iconRegistry.addSvgIcon(
       'thumbs-up',
       sanitizer.bypassSecurityTrustResourceUrl('assets/img/examples/thumbup-icon.svg'));
 }
开发者ID:Daniel-McK,项目名称:material2,代码行数:5,代码来源:icon-svg-example.ts

示例5: constructor

 constructor(
     mdIconRegistry: MdIconRegistry
 ) {
     mdIconRegistry.setDefaultFontSetClass('mdi');
 }
开发者ID:Invis1ble,项目名称:assistant-client,代码行数:5,代码来源:app.module.ts

示例6: constructor

  public constructor(iconRegistry: MdIconRegistry, sanitizer: DomSanitizer){

      iconRegistry.addSvgIcon(
        'app-icon',
        sanitizer.bypassSecurityTrustResourceUrl('assets/ic_send_white_24px.svg'));
  }
开发者ID:grecosoft,项目名称:Sandbox,代码行数:6,代码来源:app.component.ts

示例7: constructor

 constructor(mdIconRegistry: MdIconRegistry) {
   mdIconRegistry
       .addSvgIcon('thumb-up', '/icon/assets/thumbup-icon.svg')
       .addSvgIconSetInNamespace('core', '/icon/assets/core-icon-set.svg')
       .registerFontClassAlias('fontawesome', 'fa');
 }
开发者ID:RicardoVaranda,项目名称:material2,代码行数:6,代码来源:icon-demo.ts


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