Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'mat-expansion-panel' is not a known element when making build for production in angular 5

I am using lazy loading in my Angular 5 project and I have imported 'mat-expansion-panel' in one of the module. 'mat-expansion-panel' is working fine in development mode but when I make build for production it shows error that 'mat-expansion-panel' is not a known element without showing any line number.

I searched everywhere but didn't found anything.

like image 821
Shubham Avatar asked Dec 14 '22 14:12

Shubham


1 Answers

Add this to your AppModule

import {MatExpansionModule} from '@angular/material/expansion';

and then add 'MatExpansionModule' to your module's imports

like image 109
Valentin Garcia Avatar answered May 09 '23 10:05

Valentin Garcia