Get the instance of a component provider out of its scope

余生颓废 提交于 2020-05-17 06:01:36

问题


Is it possible to access the instance of a service included on a component decorator providers array from out of its scope? The scope is basically all the children components of the component where it's created, but I'd need to access it from a resolver.

I guess there should be some way to get it using the injector, but I'm not sure if the injector has access to the ElementInjector hierarchy.

来源:https://stackoverflow.com/questions/61629924/get-the-instance-of-a-component-provider-out-of-its-scope

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!