2
指令遇到錯誤並沒有爲我工作:想在這裏安裝angular2時刻
https://github.com/urish/angular2-moment
我做
npm install --save angular2-moment
工作得很好,然後我試圖這樣做:
typings install --save moment
但得到了typings: command not found
錯誤,那麼我在我的app.module.ts
文件:
import { MomentModule } from 'angular2-moment';
包括它在我的模塊聲明和入門組件陣列, 跑構建,並得到:
"Error: Unexpected module 'MomentModule' declared by the module 'AppModule' "
無我沒有把它放在那裏。它在我將它放入導入並將它從聲明和entryComponents數組中刪除之後起作用。 – Spilot