Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular like Modules #12

Closed
paulhobbel opened this issue May 15, 2017 · 1 comment
Closed

Angular like Modules #12

paulhobbel opened this issue May 15, 2017 · 1 comment

Comments

@paulhobbel
Copy link

Hello,
I know this is not supposed to be a part of a di, but still going to ask it. I've been researching the way Angular handles the @NgModule decorator, but I can't figure it out. Is it possible to build something similar with injection-js?

@mgechev
Copy link
Owner

mgechev commented May 15, 2017

Yes, this doesn't belong to. @NgModule decorator is only partially related to the DI, its main purpose is providing a context for the compiler.

In fact, the providers you pass to a @NgModule and its imports are being merged and passed to the factory method of ReflectiveInjector.

@mgechev mgechev closed this as completed May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants