Put in order · NestJS course · Module 1: NestJS Basics
Dependency Injection Process
Arrange the steps of the Dependency Injection process in NestJS from start to finish:
Items to put in order
- Registration in the module's providers array
- Defining a provider with @Injectable()
- Using the service in class methods
- Injection through the constructor
Show the answer
Correct order:
- Defining a provider with @Injectable()
- Registration in the module's providers array
- Injection through the constructor
- Using the service in class methods