1

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.

3
  • ah, thanks, it's there. I just never saw it mentioned separately anywhere. It's lacking documentation though Commented Feb 16, 2017 at 6:58
  • It's not an official package AFAIK - just community effort. Commented Feb 16, 2017 at 6:59
  • 1
    just checked it, it's empty :)... it contains export * from '@angular/core/src/di' in the index.ts source file. probably that's how it should be used. I'll try and post an answer Commented Feb 16, 2017 at 7:03

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

thanks, do you know if it's kept in sync with the one in @angular/core?
@Maximus Due to the fact that it is maintained by a member of Angular team (Minko Gechev), I personally count on this.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.