Angular 5: ngx-bootstrap 弹出窗口问题
Angular 5: ngx-bootstrap popover issue
我正在尝试将 ngx-bootstrap 弹出窗口添加到我的应用程序中。但只有当我在我使用的模块中导入 popover 包时它才有效。在 app.module.ts 中导入包是行不通的。所以,我必须将它导入到我需要的所有模块中。有没有解决这个问题的方法,所以我不需要在所有模块中导入它?
P.S。我没有使用 system.config.js.
版本 -
@angular/cli - 1.4.7
ngx-bootstrap - 2.0.2
解决方法是创建一个 SharedModule,它导入和导入 Popover 模块。
https://angular.io/guide/sharing-ngmodules
显然,这仅在您需要在每个其他模块中导入其他模块时才有用
也许就用我写的那个吧。
https://github.com/MrFrankel/ngx-popper
相当先进。
我正在尝试将 ngx-bootstrap 弹出窗口添加到我的应用程序中。但只有当我在我使用的模块中导入 popover 包时它才有效。在 app.module.ts 中导入包是行不通的。所以,我必须将它导入到我需要的所有模块中。有没有解决这个问题的方法,所以我不需要在所有模块中导入它?
P.S。我没有使用 system.config.js.
版本 -
@angular/cli - 1.4.7
ngx-bootstrap - 2.0.2
解决方法是创建一个 SharedModule,它导入和导入 Popover 模块。
https://angular.io/guide/sharing-ngmodules
显然,这仅在您需要在每个其他模块中导入其他模块时才有用
也许就用我写的那个吧。 https://github.com/MrFrankel/ngx-popper
相当先进。