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在模板中找不到引用。
我使用 TypeScript Hero。 https://github.com/buehler/typescript-hero/wiki
或使用 VS Codes 设置:“typescript.autoImportSuggestions.enabled”:true,
| 归档时间: |
|
| 查看次数: |
470 次 |
| 最近记录: |