WebStorm:如何在TypeScript / ES6中对齐html模板

时间:2016-05-06 09:09:06

标签: html typescript webstorm backticks

我想在反引号之间对齐/格式化html代码。 WebStorm中是否有设置来实现此目的?

@Component(
    {
        selector: 'my-app',
        template: `<h1>{{title}}</h1>
<h2>My Heroes</h2>
<ul class="heroes">
  <li *ngFor="let hero of heroes">
    <span class="badge">{{hero.id}}</span> {{hero.name}}
  </li>
</ul>
<h2>{{hero.name}} details!</h2>
<div>
  <label>id: </label>{{hero.id}}
</div>
<div>
  <input [(ngModel)]='hero.name' placeholder='name'/>
</div>`
    }
)

html snippet between backticks

0 个答案:

没有答案