我是新的Angular 2和primeNG以及我正在处理使用webpack服务器配置的项目,现在我想在我的项目中使用primeng我该怎么做。
我使用npm安装了primeng并在appmodule中导入了primeng模块,然后尝试使用
<p-dropdown [options]="cities" [(ngModel)]="selectedCity"></p-dropdown>
显示错误,如
./~/primeng/components/accordion/accordion.js
Module not found: Error: Can't resolve '@angular/animations' in \node_modules\primeng\components\accordion'
@ ./~/primeng/components/accordion/accordion.js 13:19-49
@ ./~/primeng/primeng.js
@ ./src/app/app.component.ts
@ ./src/app/app.module.ts
@ ./src/app/index.ts
@ ./src/main.browser.ts
@ multi (webpack)-dev-server/client?http://localhost:3000 ./src/main.browser.ts
./~/primeng/components/confirmdialog/confirmdialog.js
Module not found: Error: Can't resolve '@angular/animations' \node_modules\primeng\components\confirmdialog'
@ ./~/primeng/components/confirmdialog/confirmdialog.js 13:19-49
@ ./~/primeng/primeng.js
@ ./src/app/app.component.ts
@ ./src/app/app.module.ts
@ ./src/app/index.ts
@ ./src/main.browser.ts
@ multi (webpack)-dev-server/client?http://localhost:3000