From angular Begginer:
I work today on a monolith.
I have a shared components folder and the module that imports the dependencies has an import:
"TourMatMenuModule.forRoot()".
I have to leave this import with "forRoot()" because of a component that would break if it didn't have it.
Elsewhere I need to use this module with forRoot as well, but they start to conflict.
Is there any way I can check if there is already an instance of this module in the application and from there render with forRoot or not?
In this case, I would put this conditional rendering in the shared components module.
Other solutions are welcome as well.