What is Provider() in AngularJS ?

The provider() function allows us to create a configurable service where we can set input per application for the service created using the provider(). For example, if we need to set API key to access a service on the application level, we can set that in the module config and pass input to the provider […]

AngularJS: The Provider Subsystem

The injector needs to know how to create the objects that are to be injected, and the provider has precisely this knowledge. That’s how they work together! How does the provider know how to create objects? The provider has the recipe. Yes, seriously! That’s what Angular calls it. The provider is aware of the recipe […]

AngulasJS – Dependency Injection Demystified

What is Dependency Injection? Dependency Injection is a software design pattern in which an object is given its dependencies, rather than the object creating them itself. It is about removing the hard-coded dependencies and making it possible to change them whenever needed. Why do you need to inject dependencies? • Separate the process of creation […]