2017-07-14 1 views
0

angular 4アプリケーションをbootstrapからmaterial-2に移動します。以前のバージョンでは、ブートストラップに基づくbootstrap-socialfont-awesomeを使用していました。これは、レンダリングされる次に許可さ:角材料でソーシャルアイコンを使用する2

social icons

社会のサインインのアイコンをレンダリングするangular-material2「道」でしょうか? font-awesomeとbootstrapをマテリアルと混在させることはありませんか?

答えて

1

マテリアル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')); 
    } 
} 

ここでそれを参照してください:Angular Material 2 - Icons

も参照してください:Angular Material 2 - Typography

関連する問題