vh13294 / nestjs-url-generator

Dynamically generating & signing URL based on controller method reference.
MIT License
44 stars 16 forks source link

Importing module in child modules without configuring it #1

Closed destructor465 closed 3 years ago

destructor465 commented 3 years ago

Hello,

At the moment you have to import UrlGeneratorModule.forRoot/forRootAsync for each module you're using it in. Would it be possible to import it using forRoot/forRootAsync once in like AppModule and then in all child modules import it adding simple UrlGeneratorModule to the imports list, so you don't have to configure it every time.

destructor465 commented 3 years ago

If I try to import service it throws: Nest can't resolve dependencies of the UrlGeneratorService (?, ApplicationConfig). Please make sure that the argument UrlGeneratorModuleOptions at index [0] is available in the UrlGeneratorService context.

vh13294 commented 3 years ago

Sorry, my mistake.

Yeah there is an error, I may have to look into it.

vh13294 commented 3 years ago

I just made a quick fix.

c4f0d9503be1bdbc5364b4a6c267819a267c39af

You can update to the latest version 0.0.5

destructor465 commented 3 years ago

Thanks, it works now.