Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular Material intellisense doesn't work in VSCode

I'm working on an Angular (v13) project and I installed Angular Material using this command

ng add @angular/material

I can see the package in the node_modules, but in VSCode, the intellisense/auto-import don't work at all for a typescript file, but it works with any other package.

It's not the first time I'm having this issue with Angular Material, but I never found a solution.

enter image description here

enter image description here

like image 885
J-R Choiniere Avatar asked Sep 08 '25 03:09

J-R Choiniere


2 Answers

I ran into the same issue just now on V13. Adding the following line to tsconfig.json fixed it for me (goes under "compilerOptions"):

"typeRoots": ["node_modules/@angular/material"]

VSCode Intellisense MAterial

like image 56
Rikku121 Avatar answered Sep 10 '25 15:09

Rikku121


ok I've found the issue. To have the intellisense working, I had to import the material module in my angular module, then I can see the intellisense in the component code.

enter image description here

like image 27
J-R Choiniere Avatar answered Sep 10 '25 14:09

J-R Choiniere