Question · NestJS course · Module 1: NestJS Basics

@Injectable Decorator

What is the @Injectable() decorator used for in NestJS?

Answer options

  • Marks the class as a controller
  • Marks the class as a module
  • Marks the class as middleware
  • Marks the class as a provider that can be injected
Show the answer

Correct answer:

  • Marks the class as a provider that can be injected