NestJS · Middle · Question 19 of 75

What does ModuleRef let you do?

Explanation

It's useful for strategy patterns where the implementation is chosen at runtime. Prefer normal constructor injection when possible.

Further reading

Problem with a question

NestJS · Middle · question 19

Test yourself

Take the NestJS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz