Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'mat-select' is not a known element when making build in angular 5

I am using lazy loading in my Angular 5 project and I have a shared module in which all the material components are imported and I use this shared module in my other module for material modules.

All components are working fine in development mode but when I make build for production it shows error that 'mat-select' is not a known element without showing any line number.

I have imported shared module in my components that are using angular material and also in my app.component.ts file. I searched everywhere but no luck.

like image 417
Shubham Avatar asked Sep 06 '18 13:09

Shubham


1 Answers

Add below in your respective module.

import { MatSelectModule } from '@angular/material';

and MatSelectModule in imports.

like image 103
rahul Avatar answered Oct 26 '22 01:10

rahul