【发布时间】:2017-01-24 12:14:59
【问题描述】:
我正在使用 Visual Studio 代码开发 angular2 应用,我已经安装了以下扩展,
和
我的组件模板如下,
@Component({
selector: 'userprofile',
template: `
<div class="profilecontainer">
<div class="row">
<img [src]="profile.profilePic" />
<div class="row">
<h2>{{profile.firstName}} {{profile.lastName}} </h2>
<a target="_blank" href="{{profile.detailUrl}}"> View profile</a>
<a target="-blank" href="{{profile.editUrl}}">Edit profile</a>
</div>
</div>`
})
Hml lint 在 vs 代码上没有显示任何错误?什么问题?
【问题讨论】:
-
也许它把它看作一个字符串,而不是一个实际的 html 片段
-
不,即使是普通的 html 也能正常工作
-
您是否尝试过使用 html 文件作为模板并对其进行 lint?它可能正在尝试对 ts 文件进行 lint,这是不兼容的。
标签: angular visual-studio-code htmllint