[Diving into NestJS] 03. InstanceLoader and Injector
Intro Hi everyone. Last time, we covered how NestJS registers metadata for modules and their dependency objects. This time, let’s look at InstanceLoader and Injector, the two classes that manage the lifecycle (creation, injection, teardown) of the instances registered in each module. Dependency Injection in NestJS Dependency Injection (DI) is a programming approach where you declare the dependencies between instances up front, and hand off the work of parsing those relationships and creating instances to an IoC container, usually managed by the framework. A full explanation of DI is out of scope here. ...