我在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;
}
和模板component.compontent.html
被
<div>{{myVariable}}</div>
如果我先依次单击myVariable
和Find All References
,将找不到模板中的引用。
答案 0 :(得分:0)
我使用TypeScript Hero。 https://github.com/buehler/typescript-hero/wiki
或使用“ VS代码”设置: “ typescript.autoImportSuggestions.enabled”:是,