I'm trying to use angular material to implement an autocomplete but I'm getting the error
ERROR in app.module.ts:22:8 - error TS2306: File '/home/user/MedvibesWebRepo/medvibes/medvibes-web/medvibes/medvibes-main-web/src/main/webapp/node_modules/@angular/material/index.d.ts' is not a module.
22 } from '@angular/material/';
~~~~~~~~~~~~~~~~~~~~
index.d.ts only contains comments and I checked app.module.ts's 22nd line and it doesn't contain '@angular/material/'; I don't understand where the 22 } from '@angular/material/'; error comes from? How to fix this issue?
I think this is related to how to import module from angular/material.
For example: if you want to import MatSliderModule:
for angular 9,
import { MatSliderModule } from '@angular/material/slider';
in angular 8 or below, you can still do
import { MatSliderModule } from '@angular/material';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With