Angular 2 template strings highlighting

I'm on version 2016.1 and it's highlighting the template strings everything between ``? Is support for that not built in?

@Component({
selector: 'my-app',
template: `
<h1>Angular 2 Boilerplate</h1>
<p>Hello World!</p>`
})
5 comments

Not sure I follow you... What do you mean by " it's highlighting the template strings everything between ``?"? Please attach a screenshot.

>Is support for that not built in?

It is. But you need to make sure to set JavaScript Language version accordingly ( to either 'JSX harmony' or 'ECMAScript 6' ) in Settings | Languages & Frameworks | JavaScript, as Template strings is a part of ECMAScript 6 standard (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings, for example)

0

Thanks for the reply. I've made sure to have ECMAScript 6 selected and it still does it. I've attached a screenshot. 

 

0

The green background just indicates language injection, so it's perfectly OK. Yellow highlighting for Angular components might indicate issues resolving custom directives. Please hover over these elements - what warning is shown in tooltip?

0

Thanks for the quick reply. Good to know about the green highlighting, thanks.

And you are also correct, I have that same exact issue. "XML tag has empty body" when I hover over it.

 

0

Please sign in to leave a comment.