auto close brackets in angular 2 html

 Hi,

I'm missing the ability for square or curly brackets to auto-close in angular 2 HTML files. It works in .ts files, but not .html files. HTML files will auto close double curly brackets, but not single curly or square brackets. I tried setting the whole directory containing component HTML files to the Template Data Languages of Angular2HTML and Angular2, neither worked. I added the angularjs library in JavaScript > Libraries.

How do I get webstorm to recognize HTML files as angular 2 files?

Thanks,

gene

4 comments
Comment actions Permalink

Not sure i follow you. Please can you provide the sample HTML code where you'd like single curly or square brackets to be auto-closed?

0
Comment actions Permalink
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<input type="text" [(ngModel)]="message.content">
<article class="panel panel-default">
<div class="panel-body">
{{ message.content }}
</div>
<div class="panel-footer">
<div class="author">
{{ message.author }}
</div>
<div class="config">
<a href="">Edit</a>
<a href="">Delete</a>
</div>
</div>
</article>
</div>
</div>
</div>
0
Comment actions Permalink

can't see single braces in this example... would you like to auto-close `[]` when entering attribute, like 

[(ngModel)]

Please feel free to create a request for this feature in youtrack then

0
Comment actions Permalink

Yes, that's what I'm talking about: http://screencast.com/t/l5jXOKB2u8

0

Please sign in to leave a comment.