ZouYouShun / ngx-hm-carousel

a light carousel for Angular18+, support mobile touch by hammerJs
https://stackblitz.com/edit/stackblitz-starters-nkd5pk?file=src%2Fmain.ts
MIT License
60 stars 10 forks source link

Error in Angular 7 #12

Closed Paul75 closed 5 years ago

Paul75 commented 5 years ago

Hello,

With the sample in my application I've got :

ERROR in : Can't bind to 'ngModel' since it isn't a known property of 'ngx-hm-carousel'.

  1. If 'ngx-hm-carousel' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
  2. If 'ngx-hm-carousel' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("<ngx-hm-carousel [ERROR ->][(ngModel)]="index" (ngModelChange)="indexChanged($event)" [autoplay-speed]="3000" ")

Thanks

ZouYouShun commented 5 years ago

Hi paul , is you add FormsModule in your app.module.ts ?

We need that when we use ngModel.

https://stackblitz.com/edit/ngx-hm-carousel-fade-example

I forget add this on readme, will fill that later.