Tuesday, January 23, 2018

angularJS DI

The DI in Angular basically consists of three things:
  • Injector - The injector object that exposes APIs to us to create instances of dependencies.
  • Provider - A provider is like a recipe that tells the injector how to create an instance of a dependency. A provider takes a token and maps that to a factory function that creates an object.
  • Dependency - A dependency is the type of which an object should be created.

No comments:

Post a Comment