An lightweight, touchable and responsive library to create a carousel for angular 2+
I make a new version for angular, compatible with 7.0.0 without dependencies. NO MORE HAMMER
.
.
.
.
.
.
.
demos available here
You can install the package from our npm package
npm install --save angular2-carousel
check if not install all peer dependencies:
npm install @types/hammerjs
npm install hammerjs
First tou need to provide the CarouselModule to your desired Module
import {CarouselModule} from "angular2-carousel";
// In your App's module or Custom Module:
@NgModule({
imports: [
CarouselModule
]
})
note : if you install library from github, you should import from angular2-carousel/dist
Now, you can use CarouselModule as follow:
<carousel-component >
<div class="item-carousel">a</div>
<div class="item-carousel">
<div class="b">
<img/>
.
.
.
</div>
</div>
<div class="item-carousel">c</div>
<div class="item-carousel">d</div>
</carousel-component>
All slides of carousel must have .item-carousel
Alex Marcos Gutierrez TMTFactory
MIT