1.0.9 • Published 8 years ago

ng-swiper v1.0.9

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

Angular-Swiper-Directive

Angular 1 directive to make easy the use of swiper.
This small npm package was created motivate for the problems using directly swiper with ng-repeat as can be found in stackoverflow.

You can see a working example on Plunker: Plunker example

Requirements

Angularjs v1.3+

Installation

npm install ng-swiper --save

How to use it

The directive can be used like this:

var app = angular.module('ngSwiperExample', ['ngSwiper']);

Then add something like this in your controller:

$scope.slides = [
       {image : "https://raw.githubusercontent.com/oscarandreu/ng-swiper/master/examples/example_1/img/slider1.jpg"},
       {image : "https://raw.githubusercontent.com/oscarandreu/ng-swiper/master/examples/example_1/img/slider2.jpg"}
   ]   

And use the directive in your view:

<ng-swiper 
    elements="slides"
    on-slide-change-start ="slideChange"
    speed: "1000",
    centeredSlides: "true",
    autoplay: "5000",
    autoplayDisableOnInteraction: "true",
    slidesPerView: "1",
    paginationClickable: "true",
    effect: "fade",
    loop: 'true'
    >
</ng-swiper>

Use examples

In the examples folder you can find several examples

example_1:

Ready to go simple use example.

example_2:

Webpack 2 / ES6 example than can be checked using nodejs executing the next commands.

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

0.1.2

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago

0.0.2

8 years ago

1.0.0

8 years ago