小编tpa*_*tee的帖子

为什么在 Angular 10 中安装 ng-bootstrap 后立即出现构建错误?

我刚刚使用 Angular CLI 创建了一个全新的 Angular 10 项目,然后在设置了初始模块并路由并测试其工作原理后,我使用以下命令按照建议添加了 ng-bootstrap:

ng add @ng-bootstrap/schematics

现在,当我尝试ng serve我的项目时,出现以下错误:

Failed to compile entry-point @ng-bootstrap/ng-bootstrap (module as esm5) due to compilation errors:
../../node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.js:148:43 - error NG1006: Cannot combine @Input decorators with query decorators

148         "starTemplate": [{ type: Input }, { type: ContentChild, args: [TemplateRef,] },],
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../node_modules/@ng-bootstrap/ng-bootstrap/rating/rating.module.js:12:51 - error NG6001: The class 'NgbRating' is listed in the declarations of the NgModule 'NgbRatingModule', but is not a directive, a component, or a pipe. Either remove it …
Run Code Online (Sandbox Code Playgroud)

ng-bootstrap angular

2
推荐指数
1
解决办法
2858
查看次数

标签 统计

angular ×1

ng-bootstrap ×1