Suggest an editImprove this articleRefine the answer for “What does "inversion of control" (IoC) mean?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Inversion of Control (IoC)** is a principle where you do not control the creation and lifetime of objects, the framework does it for you. **Key point:** Angular implements inversion of control through its Dependency Injection (DI) mechanism.Shown above the full answer for quick recall.Answer (EN)Image**Inversion of Control (IoC)** is a principle where **you do not control the creation and lifetime of objects**, the **framework does it for you**. ### In simple terms: Normally you write: ```ts const service = new UserService(); ``` - that is, **you decide yourself** when and how to create the dependency. With IoC you simply say: ```ts constructor(private userService: UserService) {} ``` - and **Angular itself creates and supplies** `UserService` when it is needed. --- ### Why this is needed: - Components do not depend on specific implementations. - The code becomes more flexible: one dependency can easily be replaced with another. - Testing is simpler, a fake dependency can be substituted. --- **Summary:** Inversion of control is when control over creating objects is handed over to the framework. Angular does this through its **Dependency Injection (DI)** mechanism.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.