Visual Studio Code找不到Angular变量的所有引用

Jac*_*oni 7 visual-studio-code angular

我在macOS High Sierra版本10.13.5上使用(Visual Studio)代码版本1.24.1。我正在使用Angular(5)应用程序,并且已经注意到“查找所有引用”功能无法识别HTML模板文件中变量的出现。是否有启用此功能的插件?

一个例子。让我们假设我们有

import { Component } from '@angular/core';

@Component({
    templateUrl: './component.component.html'
})
export class MyComponent {

    public myVariable;

}
Run Code Online (Sandbox Code Playgroud)

和模板component.compontent.html

<div>{{myVariable}}</div>
Run Code Online (Sandbox Code Playgroud)

如果我右键单击myVariable,然后Find All References在模板中找不到引用。

jri*_*r27 0

我使用 TypeScript Hero。 https://github.com/buehler/typescript-hero/wiki

或使用 VS Codes 设置:“typescript.autoImportSuggestions.enabled”:true,