Answer the question
In order to leave comments, you need to log in
How to pass components between two independent Angular modules?
Angular 7.
There are two independent modules.
Module 1 declares a component that includes several more child components from module 1. Module 2 declares
a
component that includes several more child components from module 2.
PROBLEM. module component 2 in the modal window
.
And from module component 2, show module component 1 in the modal window.
It is impossible to import modules into each other in both directions (cyclic reference).
I tried to create an intermediate module and declare the necessary components in it, but then the error is that the child components are not visible.
I think that the components should somehow be called dynamically or passed to some intermediate module...
HOW TO IMPLEMENT THIS IN THE CODE???
Answer the question
In order to leave comments, you need to log in
I would put it in the third module, which holds the components shared between modules
Transfer components common to both modules into a separate service
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question