我的中有以下块app.component.ts
file:
@Component({
selector: 'my-app',
template: `
<h1>{{title}}</h1>
<h2>My Heroes</h2>
<ul class="heroes">
<li>
<!-- each hero goes here -->
</li>
</ul>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<input [(ngModel)]="hero.name" placeholder="name">
</div>
`
})
我如何告诉 WebStorm 美化我的 JS 以及引号内的 HTML?
我已经尝试过:Code > Auto-indent Lines
and Code > Reformat Code
我在用网络风暴2016.3
您可以使用Edit Angular2HTML Fragment
意图:
![enter image description here](https://i.stack.imgur.com/WjExY.png)
要调出它,只需单击Ctrl+Enter
在绳子上。
它将打开编辑器,您可以在其中美化代码,所做的更改将反映在字符串中。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)