我有一個角度2與ng2材料的視圖。一切都很明顯,即使是日誌控制檯,但它不會繪製ng2素材圖標。ng2-材料不顯示圖標
這裏是我的代碼:
import 'zone.js/lib/browser/zone-microtask';
import 'reflect-metadata';
import 'babel-polyfill';
import {Component, View, ViewEncapsulation, enableProdMode} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {HTTP_PROVIDERS} from 'angular2/http';
import {MATERIAL_DIRECTIVES, MATERIAL_PROVIDERS} from "ng2-material/all";
import {COMPONENTS_DIRECTIVES} from "./app/all";
@Component({
selector: 'app'
})
@View({
templateUrl: 'app/home.html',
styleUrls: [
'node_modules/ng2-material/dist/ng2-material.css',
'node_modules/ng2-material/dist/font.css'
],
directives: [MATERIAL_DIRECTIVES,COMPONENTS_DIRECTIVES],
encapsulation: ViewEncapsulation.None
})
export class MainApp {
constructor(){
}
}
let appProviders = [
MATERIAL_PROVIDERS
];
//enableProdMode();
bootstrap(MainApp,appProviders);
這裏是我看到:
NG2材料是「非官方」版本。官方的剛剛開始在這裏:https://github.com/angular/material2 你最好在github上聯繫他們 –
我會試一試。謝謝。 – Khaeden