我收到以下错误
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/