Inversion of control containers

An inversion of control (IoC) container is a kind of tool that acts as a smart factory. An IoC container can be used to create instances of a class. If the class has some dependencies, the IoC container will be able to use dependency injection to cover the need for them. We say that the factory is smart because it can create dependencies based on matching conditions in the execution context and it can also control the life cycle of the instances that it creates.

When we use an IoC container, we are losing control of the creation of class instances, and the injection of dependencies and the IoC container will take control of these aspects of our application. This fact should explain the meaning of the term ...

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.