fab6b39c3d
Currently the context for inject() is only set when the token is seen for the first time. This has two issues: * It should always be set when injecting from that injector, because a constructor may wish to call inject() directly. * If an NgModuleFactory is .create()'d twice, and an ngInjectableDef token is requested from each of them, the second time will fail. This is because the first injection adds the provider definition and calls the factory, and the provider definitions are shared. The second injector will see the provider definition and call the factory to create an instance, but without setting the correct context for inject(). Fixes angular/material2#10586. PR Close #23148 |
||
---|---|---|
.. | ||
anchor_spec.ts | ||
component_view_spec.ts | ||
element_spec.ts | ||
embedded_view_spec.ts | ||
helper.ts | ||
ng_content_spec.ts | ||
ng_module_spec.ts | ||
provider_spec.ts | ||
pure_expression_spec.ts | ||
query_spec.ts | ||
services_spec.ts | ||
text_spec.ts | ||
view_def_spec.ts |