Instead of having your objects create a dependency or ask a factory object to make one for them, you pass the needed dependencies in to the object externally, and you make it somebody else's problem. This "someone" is a dependency injector that builds the dependency graph.
Dependency Injection is a technique whereby one object supplies the dependencies of another object.
Suppose you want to inject an instance of a service class to your controller class in Java, you can do it by autowiring it:-
@Autowired
UserService userService;
I am new to Angular JS, so you can find the working of DI in Angular JS here.