I am working on a NestJs project. There are different modules. I want to have a common service without module that can b used anywhere in the app. Is it possible to use a common service without module? If yes then how can i use it? Actually i want to use different functions from a service.
if you want to use service term you need to register @Injectable() service to a module you can register it to app.module.ts, but it depends on what common.service.ts exactly do ?
if you want to use a dependency injection mechanism of Nestjs you should add @Injectable and a Scope then register it into whatever module do you want.
if you got the answer plz vote me up :), if not leave a comment with more details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With