Primeng 给出找不到模块“@angular/http”

use*_*583 4 jhipster primeng angular

我正在使用jhipster开发一个 Spring-Boot+Angular 应用程序。但是,在我的项目中使用带有 angular 5.6.0 的primeng 5.6.0 时出现此错误:

[at-loader] ./src/main/webapp/app/primeng/data/datascroller/datascrollerdemo.module.ts:4:28 TS2307 中的错误:找不到模块“@angular/http”。

任何帮助将被approeciated 。

Par*_*ain 5

运行命令

npm install @angular/http --save
Run Code Online (Sandbox Code Playgroud)

并重新启动您的应用程序。

基本上,您的项目中缺少 HTTP 包,因此它抛出此错误

更新

当您使用 Angular 5.6.0 时,它应该是HttpClientModule因为HttpModule在早期版本的 Angular 中已弃用