Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing Ng2BootstrapModule.forRoot() in SharedModule throw BrowserModule error #1486

Closed
gepisolo opened this issue Jan 12, 2017 · 1 comment

Comments

@gepisolo
Copy link

I've upgraded some npm packages and after that the Application stopped working complaining: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module... .After some crazy debug (I was NOT trying to import BrowserModule in any other Module), I made a text search in all my node_modules packages, and the only one containing a ref to BrowserModule was in ng2-bootstrap (sortable). So I changed my import from

Ng2BootstrapModule.forRoot()

to

DropdownModule.forRoot()

(for now I just used dropdows) and the problem is gone.

@valorkin
Copy link
Member

Thanks for pointing, missed this initially
and BTW using only what you need is a much better approach
issue in SortableModule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants