components icon indicating copy to clipboard operation
components copied to clipboard

'mat-drawer-container' is not a known element not works even though i installed all necessary @Angular/material library

Open ksabada opened this issue 3 years ago • 1 comments
trafficstars

Is this a regression?

  • [X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Error: src/app/app.component.html:1:1 - error NG8001: 'mat-drawer-container' is not a known element:

  1. If 'mat-drawer-container' is an Angular component, then verify that it is part of this module.
  2. If 'mat-drawer-container' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

Reproduction

Error: src/app/app.component.html:1:1 - error NG8001: 'mat-drawer-container' is not a known element:

  1. If 'mat-drawer-container' is an Angular component, then verify that it is part of this module.
  2. If 'mat-drawer-container' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

Expected Behavior

Error: src/app/app.component.html:1:1 - error NG8001: 'mat-drawer-container' is not a known element:

  1. If 'mat-drawer-container' is an Angular component, then verify that it is part of this module.
  2. If 'mat-drawer-container' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

Actual Behavior

Error: src/app/app.component.html:1:1 - error NG8001: 'mat-drawer-container' is not a known element:

  1. If 'mat-drawer-container' is an Angular component, then verify that it is part of this module.
  2. If 'mat-drawer-container' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):

ksabada avatar Aug 16 '22 18:08 ksabada

HI @ksabada, may you please complete the Environment part of your message?

geromegrignon avatar Aug 22 '22 07:08 geromegrignon

It looks like the MatSidenavModule isn't imported in the correct place.

crisbeto avatar May 04 '23 04:05 crisbeto

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.