talk, we will know: u What is dependency injection, and why we may use it, u how Angular uses hierarchical injectors to provide DI, u what dependency providers are Markus Ingvarsson @markusingvarssn in/markusingvarsson
in Angular: Markus Ingvarsson @markusingvarssn in/markusingvarsson u Dependency injection is a design pattern in which a class requests dependencies from external sources rather than creating them. - https://angular.io/guide/dependency-injection u Helps us achieve a more loosely coupled application
retrieving services in the app. u Will first check the element hierarchy followed by the module hierarchy. Element Injector Hierarchy Module Injector Hierarchy Element Injector yn Element Injector yn-1 Element Injector y1 Root Module Injector Platform Module Injector Null Injector Markus Ingvarsson @markusingvarssn in/markusingvarsson
retrieving services in the app. u Will first check the element hierarchy followed by the module hierarchy. Element Injector Hierarchy Module Injector Hierarchy Element Injector yn Element Injector yn-1 Element Injector y1 Root Module Injector Platform Module Injector Null Injector Markus Ingvarsson @markusingvarssn in/markusingvarsson
Dependency injection is a design pattern, commonly used in Angular, which helps us create a loosely coupled architecture, allowing us to build more maintainable apps. u Angular uses a hierarchy of injectors to retrieve any injected services to provide services on many different hierarchical levels. u Dependency providers can be used to reconfigure services which is an important tool when building great apps.
https://angular.io/guide/hierarchical-dependency-injection u https://angular.io/guide/dependency-injection-in-action u https://angular.io/api/core/Injector u Decoded Frontend - Dependency Injection in Angular @ YouTube https://www.youtube.com/watch?v=G8zXugcYd7o&list=PLX7eV3JL9sfmJ6Aa Zj9eDlAKrJrEul4Vz u Kevin Kreuzer – Angular Inject @ YouTube https://www.youtube.com/watch?v=GI5j3dJ6o90 Markus Ingvarsson @markusingvarssn in/markusingvarsson