4
votes

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.

1

1 Answers

12
votes

Add this to your AppModule

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

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