ZiiMakc
ZiiMakc

Reputation: 36806

Highlight angular syntax in html template

Is there an extension for Visual Studio Code that will highlight Angular template syntax in component HTML templates?

Angular component with an HTML template

Right now, without any syntax highlighting in the template, it just looks like a mess since it is one solid color without any contrast.

Upvotes: 1

Views: 954

Answers (2)

Muhammed Albarmavi
Muhammed Albarmavi

Reputation: 24406

Try this extension angular2-inline I been used and It's very good

enter image description here

Upvotes: 0

Dean
Dean

Reputation: 2273

If you want proper syntax highlighting in your templates, the easiest way is to store your templates in their own files. This is what your example looks like in VSCode if you store that template in its' own .html file for example:

Template Syntax Highlighting

That said, if you want to keep using inline templates, this plugin is what you are looking for.

Upvotes: 2

Related Questions