Search code examples
angularngx-bootstrap

Angular 5: ngx-bootstrap popover issue


I am trying to add ngx-bootstrap popover to my application. But it only works when I import the popover package in the module I use it. Importing the package in app.module.ts wouldn't work. So, i have to import it in all the modules i need it. Is there a work around for this, so i need not import it in all the modules?

P.S. I am not using system.config.js.

Versions -

@angular/cli - 1.4.7

ngx-bootstrap - 2.0.2


Solution

  • A workaround would be to create a SharedModule which imports and imports the Popover module.

    https://angular.io/guide/sharing-ngmodules

    Obviously, this is only useful if you have other modules that you need to import in each of your other modules