-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Modals and lazy-loaded NgbModule #784
Comments
Thanks for opening this! I think the root of the problem is that the NgbModal service is intended to be an app-wide singleton? Providers imported in lazy loaded modules are always new instances. The NgModules documentation covers this topic nicely. I'm just not sure what the correct way of configuring a lazy loaded module would be.. If I need to import NgbModule in the lazy loaded module to have access to the component directives then it will also be importing a separate instance of the NgbModal service. Thanks again. |
The Material2 team ran into a similar issue with one of their services. A good discussion and solution is available here: |
@k-schneider Yes. PRs welcomed. |
BREAKING CHANGE: The root app module must now import using the forRoot() static method. Closes ng-bootstrap#784
BREAKING CHANGE: The root app module must now import using the forRoot() static method. Closes ng-bootstrap#784
BREAKING CHANGE: The root app module must now import using the forRoot() static method. Closes ng-bootstrap#784
BREAKING CHANGE: The root app module must now import using the forRoot() static method. Closes ng-bootstrap#784
BREAKING CHANGE: The root app module must now import using the forRoot() static method. Closes #784
Ref: http://stackoverflow.com/questions/39629827/opening-a-modal-from-a-lazy-loaded-module
We need to investigate / fix (if there is anything to fix).
The text was updated successfully, but these errors were encountered: