O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The role of injectors

We just got to know what a dependency injection is and how it receives dependencies from an external client rather than creating them itself. However, the client needs to update its code to pass an instance of 20 MP Camera and 4G Internet dependencies. Any client that wants to consume the Mobile class must create instances of Camera and Internet as the Mobile class depends on them. We eliminated the responsibility for creating the instances of dependencies from the Mobile class and moved them to clients that will consume the Mobile class.

Now, it has become the poor client's problem to create the instances of Camera and Internet. So, to reduce the extra efforts of a client in creating the instances of dependencies, we ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required