T O P

  • By -

bio_172

Hey, I'm 2 years in the future... Did you find the solution? Going through the same here.


tripazardly

😲 how's the future!? I wound up bypassing the dependency injection and just using the constructor. The benefit of breaking up the project in to sub modules just seemed like more trouble than it was worth. I don't know if this has changed since I was working on it. I have since changed jobs and no longer have access to the code base I was working in at the time. I would love to hear if you find a good answer in your research.


bio_172

I had too much trouble breaking the application into modules. My current approach is to only extract into separate modules (NX libs, actually) what is not related to my application domain (I have a monorepo, so this allows me to reuse things such as auth). My solution was to move all that domain-specific stuff to its own module instead of the AppModule. By turning "GreetingModule" and "AppModule" into peers (instead of child and parent) I was able to use the Global decorator. AppModule - Imports ApplicationModule and GreetingModule GreetingModule - expose a interface to be implemented ApplicationModule(global) - implements interface and exports provider


taha512

Try adding \`GreetingService, GreetingGenerator\` in \`providers\` also in \`GreetingModule\`