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

ReactiveComponentLoaderModule.forRoot in root module and withModule for child module not working, but working vice versa #184

Open
Ni55aN opened this issue Jun 7, 2019 · 3 comments

Comments

@Ni55aN
Copy link

Ni55aN commented Jun 7, 2019

Angular 8

I did according to documentation, but it doesn't working. In runtime I getting error: No provider for InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY!

Then I moved ReactiveComponentLoaderModule.withModule to root module, but It didn't work because wt-lazy not defined in child module, so I declared ReactiveComponentLoaderModule.forRoot() in child module's imports and it works.

Is the problem with the module itself for the latest angular version or documentation incorrect?

@julamb
Copy link

julamb commented Jul 8, 2019

I'm getting the same error with Angular 7 (No provider for InjectionToken REACTIVE_COMPONENT_LOADER_MODULE_REGISTRY!).

In my case, moving ReactiveComponentLoaderModule.forRoot() to the child module didn't solve the issue.

Any pointers?
Happy to provide more information if needed.

Cheers,
Julien

@Ni55aN
Copy link
Author

Ni55aN commented Jul 8, 2019

@julamb for me ReactiveComponentLoaderModule.withModule in root module works (just export an array of ReactiveComponentLoaderModule.withModule in child modue and import in root module).

ReactiveComponentLoaderModule.forRoot() in the child module

@julamb
Copy link

julamb commented Jul 10, 2019

@Ni55aN It works indeed! It would be nice if we could use .withModule directly in the child module, but your workaround does the trick for now.

Thanks a lot!

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

No branches or pull requests

3 participants