gbrlsnchs / material2-carousel

A carousel component for Angular using Material
https://gsr.dev/material2-carousel
MIT License
85 stars 114 forks source link

Drag on mat-slider breaks when installing the carousel #43

Open timhc22 opened 4 years ago

timhc22 commented 4 years ago

After installing the module and adding to the includes section in the module file, (before importing into any components), the 'drag' function on the Material slider itself seems to stop working (can click to move the slider, but can no longer drag it). Maybe there is some clash of the classes?

timhc22 commented 4 years ago

Oh, we changed this:

//...
import { MatCarouselModule } from '@ngmodule/material-carousel';

@NgModule({
  // ...
  imports: [
    // ...
    MatCarouselModule.forRoot(),
    // ...
  ]
})
export class AppModule {}

to this:

//...
import { MatCarouselModule } from '@ngmodule/material-carousel';

@NgModule({
  // ...
  imports: [
    // ...
    MatCarouselModule,
    // ...
  ]
})
export class AppModule {}

And it works now.

Jay-PC commented 4 years ago

We also installed using npm and followed all directions. Our swipe is not working either. We removed the ".forRoot()," as in the above suggestion and it had no affect. Perhaps they changed something else as well? To test this theory, if you have a working project, try putting the ".forRoot()" back in and see if the swipe still works? We have checked all the other usual suspects like our hammerjs is the same version as yours, etc. Can you help us, please? Thanks =Jay

IAMtheIAM commented 4 years ago

Drag and slide is not working for me either... not sure what the problem is. Hammerjs is imported into main.ts