leo6104 / ngx-slick-carousel

Angular 17+ wrapper for slick plugin
113 stars 45 forks source link

Custom Modules Slick Slider is not working #110

Open nikhilkhot46 opened 1 year ago

nikhilkhot46 commented 1 year ago

Angular CLI: 15.0.5 Node: 18.16.1 Package Manager: npm 9.5.1 OS: win32 x64

Angular: 15.2.9 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1502.9 @angular-devkit/build-angular 15.2.9 @angular-devkit/core 15.2.9 @angular-devkit/schematics 15.0.5 @angular/cli 15.0.5 @schematics/angular 15.0.5 rxjs 7.5.7 typescript 4.8.4

"jquery": "^3.7.0", "ngx-bootstrap": "^6.2.0", "ngx-slick-carousel": "^15.0.0", "slick-carousel": "^1.8.1",

Error Error: src/app/frontend/home/home.component.html:42:9 - error NG8001: 'ngx-slick-carousel' is not a known element:

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

42 <ngx-slick-carousel class="carousel" #slickModal="slick-carousel" [config]="slideConfig"

43             (init)="slickInit($event)" (breakpoint)="breakpoint($event)" (afterChange)="afterChange($event)"

44 (beforeChange)="beforeChange($event)">


  src/app/frontend/home/home.component.ts:5:16
    5   templateUrl: './home.component.html',
Error occurs in the template of component HomeComponent.

Error: src/app/frontend/home/home.component.html:42:59 - error NG8003: No directive found with exportAs 'slick-carousel'.

42 <ngx-slick-carousel class="carousel" #slickModal="slick-carousel" [config]="slideConfig"



  src/app/frontend/home/home.component.ts:5:16
    5   templateUrl: './home.component.html',

I tried with app.module and it is working fine on app.html
but I have create home component and frontend module and trying to import SlickCarouselModule in frontend module, It is not working.

**Please help**