Click in order · NestJS course · Module 1: NestJS Basics

Injecting a Service into a Controller

Arrange the elements of injecting a service through the controller constructor:

Items to click

  • ) {}
  • private readonly legionService:
  • constructor(
  • LegionService
Show the answer

Correct order:

  1. constructor(
  2. private readonly legionService:
  3. LegionService
  4. ) {}