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
feat(compiler): Resolvers now use DI to create reflector #7762
Conversation
824c3a9
to
38458d2
Compare
Looks good. Maybe rename the commit into |
Do you also want to change |
Turns out that |
a41dee7
to
b2f8803
Compare
b2f8803
to
894b984
Compare
Also introduced ReflectorReader when only read-only access to the reflector is needed.
894b984
to
1030947
Compare
Also introduced ReflectorReader when only read-only access to the reflector is needed. Closes angular#7762
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The reflector that is used by the metadata resolvers is now a parameter that can be initialized by DI.
The metadata resolvers unconditionally use
reflector
from'angular2/core'
.The metadata resolvers now use the
reflector
that passed in as a constructor parater.DirectiveResolver
,PipeResolver
andViewResolver
now take the reflector they will use as a parameter. Code that constructs instances manually now need to provide theReflector
instance they wish to use. Ifreflector
from'angular/core'
is passed as the parameters, they will behave identically to previous behavior.Also introduced ReflectorReader when only read-only access to the reflector is needed. The metadata resolvers only use the methods from ReflectorReader and the type the request from DI. The platform injector was updated to request the existing Reflector instance by default for ReflectorReader.