0

I get this error with Angular Universal, lazy loading and share module of material. When I run npm run dev:ssr I get this error I think that is combination of lazy loading and Angular Universal.

'mat-card-content' is not a known element

import { ExceptionModalComponent } from './../../components/exception-

modal/exception-modal.component';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ExceptionModalRoutingModule } from './exception-modal-routing.module';
import { MaterialModule } from '../shared/material.module';


@NgModule({
  declarations: [ExceptionModalComponent],
  imports: [
    CommonModule,
    MaterialModule,
    ExceptionModalRoutingModule
  ]
})
export class ExceptionModalModule { }
bad_coder
  • 11,289
  • 20
  • 44
  • 72
Rams
  • 1
  • 1
  • 2
  • 1
    In your MaterialModule make sure you have the MatCardModule in both the `import` and `export` arrays of the `@NgModule` metadata – Jake Stokes Jul 26 '20 at 19:37

1 Answers1

0

You need to add MatCardModule in your ExceptionModalModule.

import {MatCardModule} from '@angular/material/card';