[ad_1]
My project is based on nx-workpsace and i am having 1 project in apps
and 2 libraries in my libs
folder.
The structure looks like this:
+-- apps
| +-- main-application
+-- libs
| +-- lib-1 (feature-library)
| +-- lib-2 (shared-components-library)
I am importing the lib-1
in my main-application
like this:
imports: [
lib1Module.forRoot()
]
If i now try to import the lib1Module
in my lib2Module
like this
imports: [
lib1Module
]
Im getting the following error: Uncaught TypeError: Cannot read properties of undefined (reading 'lib1Module')
I think the error is the forRoot()
in the main application but i don’t know how to fix this, because i need to provide the lib-1
services in the main-application
. The reason why i need the lib1Module
in my lib2Module
is that i use an directive
of lib-1
in lib-2
.
[ad_2]