Dan*_*ark 2 html visual-studio-code angular
有什么方法可以设置VS代码格式化程序来格式化Angular 2+模板中的组件,以将属性换行。我希望它是这种格式:
<app
[input1]="input1$ | async"
[input2]="input2$ | async"
(inputChanged)="setInput(input)">
</app>
Run Code Online (Sandbox Code Playgroud)
对我们来说,启用自动格式化并以这种方式格式化将是很好的。React在下一行中包装JSX属性并对齐它们具有类似的功能。
在vscode(1.27.2)中,按ctrl+shift+p并键入open user settings,然后转到用户设置文件并添加"html.format.wrapAttributes": "force-aligned"命令。
| 归档时间: |
|
| 查看次数: |
390 次 |
| 最近记录: |