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