简体   繁体   English

angular2装饰器内的注入器

[英]injector inside an angular2 decorator

I have been writing a custom method decorator in typescript for Angular2. 我一直在Angular2的typescript中编写自定义方法装饰器。

The decorator needs to have access to the 'ApplicationRef'. 装饰者需要访问'ApplicationRef'。

Is it possible to inject into method decorators? 是否可以注入方法装饰器? If not, how else can i access the applicationRef? 如果没有,我还能如何访问applicationRef?

经过大量研究后,这似乎不可能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM