How to use material2-carousel in feature module component

Viewed 362

I am using Angular 7 and I tried to use material carousel (https://github.com/gbrlsnchs/material2-carousel).

I have problem to use this in my feature module.

1) I tried to import it in main module:

import { MatCarouselModule } from '@ngmodule/material-carousel';
@NgModule({
  imports: [
    MatCarouselModule.forRoot()
  ]

2) I tried to import it on the same way as in line above into my shared material module which I import in all my feature modules.

3) I tried to import in main module and also shared module.

No one of those 3 solutions work.

I always get error:

ERROR Error: Uncaught (in promise): Error: Template parse errors:
'mat-carousel-slide' is not a known element:
1. If 'mat-carousel-slide' is an Angular component, then verify that it is part of this module.
2. If 'mat-carousel-slide' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
        </div>
      <mat-carousel>
        [ERROR ->]<mat-carousel-slide>
            1
          </mat-carousel-slide>
"): ng:///EditorModule/ImageDisplayComponent.html@41:

Any advice please ?

0 Answers
Related