Angular Ngb引导的角度依赖性问题

Angular Ngb引导的角度依赖性问题,angular,twitter-bootstrap,Angular,Twitter Bootstrap,我是Angular的新手,我正在尝试使用ng bootstrap的组件在Angular中创建一个图像滑块旋转木马,但在创建Angular项目后,我使用npm install--save@ng bootstrap/ng bootstrap安装了“ng bootstrap”(在项目中),并使用import{NgbModule}将其导入app.module.ts中来自“@ng bootstrap/ng bootstrap” 我也在项目中安装了ng add@angular/localize,但我不确定是

我是Angular的新手,我正在尝试使用ng bootstrap的组件在Angular中创建一个图像滑块旋转木马,但在创建Angular项目后,我使用
npm install--save@ng bootstrap/ng bootstrap
安装了“ng bootstrap”(在项目中),并使用
import{NgbModule}将其导入app.module.ts中来自“@ng bootstrap/ng bootstrap”

我也在项目中安装了
ng add@angular/localize
,但我不确定是什么问题,它向我显示了以下错误:

ERROR in The target entry-point "@ng-bootstrap/ng-bootstrap" has missing dependencies:
 - tslib
 - @angular/core
 - @angular/common
 - @angular/forms
 - rxjs
 - rxjs/operators

我跟在后面。下一步我应该尝试什么?

我建议在引导之外安装jQuery和Popper.js:

npm install bootstrap --save
npm install jquery --save
npm install popper.js --save
在项目文件夹中,转到src/styles.cs并添加以下代码行

@import "~bootstrap/dist/css/bootstrap.min.css";
然后转到src/angular.json并将以下行添加到“脚本”:


希望这有帮助。

我建议在引导之外安装jQuery和Popper.js:

npm install bootstrap --save
npm install jquery --save
npm install popper.js --save
在项目文件夹中,转到src/styles.cs并添加以下代码行

@import "~bootstrap/dist/css/bootstrap.min.css";
然后转到src/angular.json并将以下行添加到“脚本”:


希望获得此帮助。

确保您位于项目的根文件夹中,然后运行此命令

ng add @ng-bootstrap/ng-bootstrap 


确保您位于项目的根文件夹中,然后运行此命令

ng add @ng-bootstrap/ng-bootstrap 


添加此选项后,应用程序将加载,但屏幕为空,不显示任何内容在执行前面的步骤后,您不必从引导添加“ngbModule”,您可以在所有项目中直接使用引导类。添加此选项后,应用程序将加载,但屏幕为空,不显示任何内容在完成前面的步骤后,您不必从引导添加“ngbModule”,您可以在所有项目中直接使用引导类。