1

i know this might kind of sound dumb but whenever i write templates in Angular 2 my html just shows up as gray text and i cant do things like autocomplete and stuff. Same issue with the CSS

Is there a plugin to solve this or is this a settings issue?

BTW im using Visual studio code

EDIT: Screenshot

enter image description here

jeremy
  • 433
  • 1
  • 8
  • 30

2 Answers2

1

There is a plugin that will add this highlighting: https://marketplace.visualstudio.com/items?itemName=nwallace.language-vscode-javascript-angular2

Appears from the comments it doesn't actually support intellisense/completion in there but has syntax highlighting. Personally use IntelliJ products for a lot of projects and they have a "language injections" option: https://www.jetbrains.com/help/idea/2016.2/using-language-injections.html Perhaps Visual Studio has something similar or you can try out IntelliJ.

shaunhusain
  • 19,630
  • 4
  • 38
  • 51
1

Have you configured Angular Js 2 and TypeScript correctly in Visual Studio Code? Here's a link link for that.

Sohil
  • 532
  • 7
  • 26