How to use angular DI separately

94 Views Asked by At

This article states that:

The existing DI (angular1) has some problem though:

Built into the framework - Angular 1’s DI is baked right into the framework. There’s no way for us to use it decoupled as a standalone system.

How can I use angular2 DI as a standalone system? It's not published as a separate package as I understand.

1

There are 1 best solutions below

2
On BEST ANSWER

It was previously possible to import it from @angular/core. It is published as a separate package, injection-js, by a member of Angular team.

Also see this answer.