0
我正在将angular 4
应用程序从bootstrap
移动到material-2
。以前的版本使用的是基于bootstrap的bootstrap-social和font-awesome
。它允许下面的显示效果:在角材2中使用社交图标
什么是渲染社交登录图标的angular-material2“的方式”? 一个不会混合材料的字体真棒和bootstrap?
我正在将angular 4
应用程序从bootstrap
移动到material-2
。以前的版本使用的是基于bootstrap的bootstrap-social和font-awesome
。它允许下面的显示效果:在角材2中使用社交图标
什么是渲染社交登录图标的angular-material2“的方式”? 一个不会混合材料的字体真棒和bootstrap?
在材料2中,除了材质设计图标提供的图标之外,您还可以提供自己的图标。
import { Component } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { MdIconRegistry } from '@angular/material';
@Component({
selector: 'icon-usage',
templateUrl: 'icon.component.html',
styleUrls: ['icon.component.css']
})
export class IconComponent {
constructor(iconRegistry: MdIconRegistry, sanitizer: DomSanitizer) {
iconRegistry.addSvgIcon('angular', sanitizer.bypassSecurityTrustResourceUrl('/assets/angular-icon.svg'));
}
}