Home > Net >  IntelliSense for Angular Material CSS Class doesn't appear when executed
IntelliSense for Angular Material CSS Class doesn't appear when executed

Time:06-21

After I run the command "ng add @angular/material" when I write HTML code in VSCode, no IntelliSense appears for Material CSS classes. For example, for the code line <div >This is the page header<\div> when I type "mat" inside the CSS class name, it does not show a CSS list for me to select.

CodePudding user response:

Add Angular Language support and snippets.

https://marketplace.visualstudio.com/items?itemName=Angular.ng-template

Make sure TS is started.

tsc --init 

And add Angular Language Service, Angular Material v10 snippets.

Hit Cmd-Shift-P (macOS) or Ctrl-Shift-P (Windows, Linux)
Select Install Extension
Choose the extension Angular Material v10 snippets
Reload Visual Studio Code

CodePudding user response:

Found a solution. The extension IntelliSense for CSS class names in HTML works for me, even though there is a small glitch in this extension. You have to type the whole tag , move to another line and come back to class name.

  • Related