简体   繁体   English

WebStorm 中 HTML 中的 Angular Object 文字大括号

[英]Angular Object literal braces in HTML in WebStorm

I'm facing a "problem", it's not a problem just disturbing, in WebStorm.我正面临一个“问题”,在 WebStorm 中,这不仅仅是令人不安的问题。

When in HTML file I've an Object Literal expression like below with many space/tabs on the same line before/after expression, reformat doesn't work.在 HTML 文件中,我有一个 Object 文字表达式,如下所示,在表达式之前/之后的同一行上有许多空格/制表符,重新格式化不起作用。

<div>{{test}}        </div>

Same if it's too long, it doesn't wrap correctly, and made some strange formatting.如果它太长也一样,它不能正确换行,并且做了一些奇怪的格式。

<div>{{verylongobjctliteralexpression}} 
</div>

It's like it doesn't recognize the {{}} in html or something like that:/就像它无法识别 html 中的{{}}或类似的东西:/

I've check every settings concerning HTML in CodeStyle section in the Settings but doesn't find anything.我已经检查了设置中 CodeStyle 部分中有关 HTML 的所有设置,但没有找到任何内容。 I've the default plugin for Angular but no special menu for it...我有 Angular 的默认插件,但没有专门的菜单...

In your file press Ctrl+Shift+Alt+L .在您的文件中按Ctrl+Shift+Alt+L

Reformat dialog will show.将显示重新格式化对话框。 There you can config how the reformat occur in the file.在那里您可以配置文件中重新格式化的方式。

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

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