Reputation: 694
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.
Upvotes: 3
Views: 3499
Reputation: 2642
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"]
Upvotes: 17
Reputation: 694
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.
Upvotes: 2
Reputation: 1
Not sure if this will help, but you can try using an extension like (Angular Language Service) available here https://marketplace.visualstudio.com/items?itemName=Angular.ng-template
Upvotes: 0