简体   繁体   English

使用Angular 2的Webstorm模板字符串html格式

[英]Webstorm template string html format with Angular 2

In the WebStorm 2016.1 release notes they have this image. 在WebStorm 2016.1发行说明中,他们有这个图像。

在此输入图像描述

See here 看这里

But when I try to type this mine looks like this 但是当我尝试打字时,我的看起来像这样

在此输入图像描述

Do I have to manually enter the tabs to make this happen? 我是否必须手动输入标签才能实现此目的? Shouldn't it auto format? 它不应该自动格式化吗? If so, how do I set up auto formatting? 如果是这样,我如何设置自动格式?

You can use the Angular2HTML Fragment editor. 您可以使用Angular2HTML Fragment编辑器。 With your cursor positioned inside your inline template, you should see an orange exclamation popup. 将光标放在内联模板中,您应该会看到橙色感叹号弹出窗口。 In this should be an option to "Edit Angular2HTML Fragment". 在这应该是“编辑Angular2HTML片段”的选项。

在此输入图像描述

I'm using the latest version of WebStorm 2016.1 我正在使用最新版本的WebStorm 2016.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM