Home

Published

- 1 min read

add `CUSTOM_ELEMENTS_SCHEMA` to the `@NgModule.schemas` of this component to suppress this message

img of add `CUSTOM_ELEMENTS_SCHEMA` to the `@NgModule.schemas` of this component to suppress this message

The solution for this is noted below

add CUSTOM_ELEMENTS_SCHEMA to the @NgModule.schemas of this component to suppress this message

Solution

   //In the app.module.ts
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
...
@NgModule({
  declarations: [ ... ],
  exports: [ ... ],
  imports: [ ... ],
  schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
})

Try other methods by searching on the site. That is if this doesn’t work