Dependency Injection

If we're used to work with modern languages such as .NET Core, ReactJS, AngularJS, or Angular, we most likely already know what Dependency Injection (DI from now on), as well as the huge amount of benefits it brings in terms of code reusability, testability, readability, simplicity, and so on. In the unlikely case you don't, we'll make fun of ourselves trying to shrink one of the most important code design patterns in the last 20 years in less than 20 words using a coding technique where a class receives its dependencies from external sources rather than directly instantiating them.

For the sake of simplicity, we will stop here; however, those who want to know more about this topic can take an extensive look at this great guide from the official Angular documentation, which explains how DI works both in general terms and within the Angular framework:

https://angular.io/guide/dependency-injection
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.147.77