Components module imported in app.module.ts throwing error

Hi,

I am trying to import a components module in app.module.ts. Even after importing there I am getting error when the component is used in the page.

The error is as follows:

  1. If ‘bread-crumb’ is an Angular component, then verify that it is part of this module.
  2. If ‘bread-crumb’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message. ("

If i import the component in the page module where I am using it, it is working fine. Stuck in here. Please help.

PS: I am lazy loading my ionic pages

Thanks.

The problem might be that you need to add it to the exports as well.

try:

@NgModule({
  declarations: [
    BreadCrumbComponent
  ],
  exports: [
    BreadCrumbComponent
  ],
  bootstrap: [IonicApp]
})
export class AppModule {
}

Not 100% sure that it works but it’s a guess.