Giter Site home page Giter Site logo

julienyo / angular-carousel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from revolunet/angular-carousel

0.0 1.0 0.0 1.02 MB

Mobile friendly AngularJS carousel

Home Page: http://revolunet.github.io/angular-carousel

JavaScript 41.78% CSS 57.88% Ruby 0.34%

angular-carousel's Introduction

AngularJS Touch Carousel

An AngularJS carousel implementation optimised for mobile devices.

Demo : http://revolunet.github.io/angular-carousel

Comments and contributions welcome :)

Proudly brought to you by the @revolunet team.

NOTE : if you use IE<=9, iOS<7 or Android<4 please include the requestAnimationFrame polyfill in your application.

Usage :

  1. If you use bower, just bower install angular-carousel. If not, download files from the github repo
  2. Add angular-carousel.css, angular-carousel.js to your code:
<link href="angular-carousel.css" rel="stylesheet" type="text/css" />
<script src="angular.js"></script>
<script src="angular-touch.js"></script>
<script src="angular-carousel.js"></script>
  1. Add a dependency to the angular-carousel module in your application.
angular.module('MyApp', ['angular-carousel']);
  1. Add a rn-carousel attribute to your <ul> block and your <li>'s become magically swipable ;)
<ul rn-carousel class="image">
  <li ng-repeat="image in sportImages" style="background-image:url({{ image }});">
    <div class="layer">{{ image }}</div>
  </li>
</ul>
  1. You can also use rn-carousel without ng-repeat ;)
<ul rn-carousel class="image">
  <li>slide #1</li>
  <li>slide #2</li>
  <li>slide #3</li>
</ul>

Features :

  • Mobile friendly, tested on webkit+firefox
  • use CSS 3D transformations and requestAnimationFrame. (fallback to CSS 2D if 3D support not available)
  • DOM buffering
  • index data-binding
  • optional indicators

Regular carousel :

  • rn-carousel-index two way binding to control the carousel position.
  • rn-carousel-indicator boolean value to enable the indicator, see demo page.
  • rn-carousel-buffered boolean value to enable the carousel buffering, good to minimize the DOM, defaults to 5 slides. (works only with arrays)
  • rn-carousel-swipe boolean value to enable/disable swiping (default true)
  • rn-carousel-control boolean value to enable builtin prev/next buttons (you can override by CSS)

Todo :

Contributing

Inspirations

Licence

As AngularJS itself, this module is released under the permissive MIT license. Your contributions are always welcome.

angular-carousel's People

Contributors

revolunet avatar fastfrwrd avatar 0x-r4bbit avatar outofculture avatar mgcrea avatar jeffbcross avatar tuikiken avatar admad avatar othermore avatar demerzel3 avatar jonlil avatar leeroybrun avatar mixuala avatar jumplink avatar xowap avatar jptredoux avatar

Watchers

Julien Leroy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.