Lon*_*ely 6 reference typescript visual-studio-code angular
如您所知,您可以在 VSCode 中启用以下设置以查看编辑器中的引用:
"typescript.implementationsCodeLens.enabled": true,
"javascript.referencesCodeLens.enabled": true
Run Code Online (Sandbox Code Playgroud)
正如您在下图中所见,没有引用(请参阅下面的代码和方法名称“myOperations”上方的灰色参考信息文本) 0 references)
但事实上,它是存在的!它存在于一个角度模板中:
<div class="some-cool-class">
<my-super-thing
*ngIf="ifItIsCool"
(operations)="myOperations($event)"
>
</my-super-thing>
Run Code Online (Sandbox Code Playgroud)
我能以某种方式处理吗?我怎样才能从模板中看到引用(方法调用)?
2021 年 1 月 26 日编辑(来自 Johan Aspeling):
似乎终于用新的 Ivy 语言服务(在 Angular 11 中使用) Angular Language Service v11+修复了
===
Angular 的官方语言服务不支持该功能。
有一个未解决的问题需要添加它,该问题在两年多的时间里完全被忽略了,一年前提出的第二个问题也被忽略了。
| 归档时间: |
|
| 查看次数: |
881 次 |
| 最近记录: |