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

Modified the Dependency Injectection for lazy-loaded modules #476

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shaswat94
Copy link

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
Currently, getting the following error while trying to lazily load NgxModule:

ERROR NullInjectorError: R3InjectorError(AppModule)[LayoutService -> LayoutService -> LayoutService]:
NullInjectorError: No provider for LayoutService!
In order to try to solve the problem, i tried instanciating the service by myself, but
Module not found: Error: Package path ./lib/graph/layouts/layout.service is not exported from package

What is the new behavior?
Lazily loads without any exception.

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

for lazy-loaded modules
@cfrezier
Copy link

I think that it would be ok.
If I can, I'll change the providedIn: any to providedIn: root because the other one seems deprecated now.

@shaswat94
Copy link
Author

@assafsun, @marjan-georgiev, Please merge the PR after review.

@shaswat94
Copy link
Author

@assafsun, @marjan-georgiev, Any updates?

@preethampoonacha
Copy link

@cfrezier @marjan-georgiev @assafsun
Can we go ahead with this merge, layoutService needs to be global inject for lazy loading.

@Shaswat-Swarup-Maersk
Copy link

@cfrezier @marjan-georgiev @assafsun Can we go ahead with this merge, layoutService needs to be global inject for lazy loading.

Are you still waiting for a reply dude 😆

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

Successfully merging this pull request may close these issues.

4 participants