angular - Ngx-Bootstrap 和 Angular 9 ModuleWithProviders 错误

标签 angular bootstrap-4 ngx-bootstrap angular9 ngx-bootstrap-popover

我收到以下错误

ERROR in node_modules/ngx-bootstrap/popover/popover.module.d.ts:3:23 - error NG6005: 
PopoverModule.forRoot returns a ModuleWithProviders type without a generic type argument. 
Please add a generic type argument to the ModuleWithProviders type.
If this occurrence is in library code you don't control, please contact the library authors.

我刚刚添加了 Ngx-Bootstrap 的 Popover 模块并导入了 PopoverModule.forRoot()。这似乎是 Angular 9 不兼容的原因。怎么解决这个问题呢?

最佳答案

我解决这个错误的方法太小了。

我只需运行ng add ngx-bootstrap --component popover

它说:

Skipping installation: Package already installed
Unknown option: '--component'
Unknown option: 'popover'

但是当我为该项目提供服务时,它无论如何都运行成功了。

关于angular - Ngx-Bootstrap 和 Angular 9 ModuleWithProviders 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60824686/

相关文章:

html - 当卡片文本很长时,防止使用图像扩展引导卡

html - 固定标题重叠页面内容

angular - ngx-datepicker header 为空

html - 找不到 Angular 4 img src

javascript - 在 ng2 中实现下拉菜单的正确方法?

css - 不能在 div 中间居中元素

angular - 当弹出窗口悬停(ngx-bootstrap)时,如何让弹出窗口保持事件状态?

angular - 将 Chevron 图标添加到 ngx-bootstrap Accordion

css - 当 xhr 请求正在进行时, Angular 2/5 加载指示器

css - 如何更改 Angular Material 垫子滑动切换属性?