• This repository has been archived on 10/May/2018
  • Stars
    star
    1,550
  • Rank 30,187 (Top 0.6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mobile friendly AngularJS carousel

AngularJS Touch Carousel

An AngularJS 1 carousel implementation optimised for mobile devices.

This project is not maintained anymore, and looking for maintainers.

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

Comments and contributions welcome :)

Proudly brought to you by the @revolunet team.

Install :

Bower

bower install angular-carousel

npm

npm install angular-carousel

If you don't use NPM or Bower, just download files from the github repo

Usage :

  • Add angular-touch.js and angular-carousel.js to your code:
<script src="angular.js"></script>
<script src="angular-touch.js"></script>
<script src="angular-carousel.js"></script>
  • Or just require the module the CommonJS way (if you use npm)
var angular = require('angular');
var ngTouch = require('angular-touch');
var carousel  = require('angular-carousel');
  • Add angular-carousel.css to your code:
<link href="angular-carousel.css" rel="stylesheet" type="text/css" />
  • Add a dependency to the angular-carousel module in your application.
angular.module('MyApp', ['angular-carousel']);
  • 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">
    <div class="layer">{{ image }}</div>
  </li>
</ul>
  • 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>

Directive options :

  • rn-carousel-index two way binding integer to control the carousel position (0-indexed)
  • rn-rn-carousel-html-slides: two way binding array to get slides if no ng-repeat was used (slides array)
  • rn-carousel-buffered add this attribute to enable the carousel buffering, good to minimize the DOM (5 slides)
  • rn-carousel-controls add this attribute to enable builtin prev/next buttons (you can override by CSS)
  • rn-carousel-auto-slide add this attribute to make the carousel slide automatically after given seconds (default=3)
  • rn-carousel-transition : transition type, can be one of slide, zoom, hexagon, fadeAndSlide, none. (default=slide)
  • rn-carousel-locked: two way binding boolean that lock/unlock the carousel
  • rn-carousel-deep-watch: Deep watch the collection which enable to dynamically add slides at beginning without corrupting position
  • rn-carousel-easing: add this attritube to specify a formula for easing, these can be found in the shifty library (default=easeIn)
  • rn-carousel-duration: add this attribute to set the duration of the transition (default=300)
  • rn-carousel-controls-allow-loop: add this attribute to allow looping through slides from prev/next controls

Indicators

You can add position indicators by adding this directive where you want :

<div rn-carousel-indicators ng-if="slides.length > 1" slides="slides" rn-carousel-index="carouselIndex"></div>
  • slides is the same collection you use in the carousel ng-repeat

Note: If loading in slides from an async service, the ng-if="slides.length > 1" may not update as expected. In this case, try ng-if="slides".

  • carouselIndex is the same index you've defined for the carousel

Note: If the indicators don't seem to update with the slides, try binding to an object param i.e. carousel.index, set in the controller like $scope.carousel.index = 0 Explanation.

Notes :

  • if you use IE<=9, iOS<7 or Android<4 please include the requestAnimationFrame polyfill in your application.
  • if you use IE<=8 include the es5-shim polyfill in your application.
  • don't set any style attribute to your li's. they would be overwritten by the carousel (use classes instead).
  • angular-carousel use the great shifty.js for the animations

Todo :

  • delay autoslide on indicators click/move
  • customisable transitions
  • more transition types
  • infinite loop support

Contributing

Inspirations

License

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

More Repositories

1

JSbooks

Directory of free JavaScript ebooks
CSS
2,510
star
2

sublimetext-markdown-preview

markdown preview and build plugin for sublime text 2/3
Python
2,318
star
3

PythonBooks

Directory of free Python ebooks
CSS
1,900
star
4

angular-google-analytics

Google Analytics tracking for your AngularJS apps
JavaScript
652
star
5

react-mailchimp-subscribe

React subscribe form for Mailchimp.
JavaScript
233
star
6

pypdftk

Python module to drive the awesome pdftk binary.
Python
145
star
7

rn-lazy

AngularJS lazy loader for images
JavaScript
91
star
8

spreadsheet-to-json

Convert Google Spreadsheets to JSON using Javascript
JavaScript
58
star
9

django-extjs

moved to https://github.com/revolunet/extdirect.django
JavaScript
47
star
10

react-srcset-image

React component to optimize your images based on srcset and add an automatic medium-like blur animation.
JavaScript
43
star
11

Ext.ux.filebrowser

ExtJs FileBrowser
JavaScript
42
star
12

webaudio-wav-stream-player

instantly play remote wav streams using fetch API + WebAudio
JavaScript
38
star
13

react-analytics-widget

Embed Google Analytics widgets in your React applications.
JavaScript
37
star
14

node-readme

Generate your JS project README.md using an ES6 template
JavaScript
32
star
15

sublimetext-google-apps-scripts

SublimeText 2 plugin to edit your Google Apps Scripts
Python
30
star
16

VLCcontrols

jQuery based VLC plugin
JavaScript
29
star
17

Ext.ux.upload

SWFupload + html5 drag&drop + progressbars for ExtJs
JavaScript
27
star
18

react-eventsource

Connect your react components to any EventSource
JavaScript
26
star
19

angular-stepper

AngularJS numeric stepper
JavaScript
26
star
20

s63

Ressusciter un téléphone à cadran S63 avec un RaspberryPi et NodeJS
JavaScript
24
star
21

react-orbitdb

react hooks and providers for dealing with ipfs orbit-db datasources
JavaScript
21
star
22

node-sellsy

Node Sellsy API wrapper
JavaScript
17
star
23

create-react-app-circleci

create-react-app + CircleCI CI/CD workflow
JavaScript
17
star
24

algolia-react-input

A simple react input component to query your algolia index
JavaScript
17
star
25

react-gravizo

Generates Graphviz schemas from source code with gravizo.com
JavaScript
16
star
26

react-umd-loader

Async load any remote UMD compatible React component into your app.
JavaScript
15
star
27

gitlab-docker-rancher-letsencrypt-setup

Automated private dev environment with docker, gitlab CI/CD...
JavaScript
15
star
28

sublimetext-html-export

Export your code to nicely formatted HTML
JavaScript
14
star
29

node-babel-boilerplate

Basic Node, Babel, Tape boilerplate
JavaScript
14
star
30

django-extjs-filebrowser

django + ExtJs + PyFileSystem ajax GUI
Python
13
star
31

react-twiml

Automate SMS and Voice with React and @twilio
JavaScript
12
star
32

trackscan

Analyse des trackers présents sur la page d'accueil des sites des organismes publics 🇫🇷
JavaScript
12
star
33

django-extjs-login

ExtJs login widget with django backend
JavaScript
11
star
34

sencha-wakanda

sencha+wakanda integration demos
JavaScript
11
star
35

Ext.ux.AwesomeCombo

combobox awesomeness
JavaScript
10
star
36

cordova-download-plugin

Download and unzip with progress callbacks
Objective-C
10
star
37

node-android-emulator

Manage android emulators from your NodeJS scripts.
JavaScript
10
star
38

sublimetext-web-encoders

url and base64 helpers for SublimeText 2
Python
10
star
39

phonegap-sencha-demo

Sample Sencha+Phonegap 1.6 projects
JavaScript
9
star
40

pyfilesystem

pyfilesystem svn mirror
Python
9
star
41

angular-react-meetup

demo + slides
JavaScript
8
star
42

mermaid-api

Microservice to embed mermaid charts in GitHub or whatever static markdown
HTML
8
star
43

traefik-filebeats-kibana

sample docker-compose with traefik and kibana dashboard using filebeats
8
star
44

dropboxfs

dropboxfs for pyfilesystem
Python
8
star
45

react-appear

Use in-viewport to trigger transitions on your components when they become visible in the viewport
JavaScript
8
star
46

ios-webrtc

HTML
6
star
47

angular-for-mobile

slides for AngularJS+Phonegap meetup 2013
JavaScript
6
star
48

jabber-presencebot

simple python/jabber bot that tracks users presence
Python
6
star
49

betamap

DataViz des startups d'état
TypeScript
5
star
50

memoRobots

memoRobots kivy game
Python
5
star
51

haxevideo

clone from http://code.google.com/p/haxevideo
Haxe
4
star
52

react-pinout

RaspberryPi pinout React component
JavaScript
4
star
53

angularjs-workshop

sample AngularJS + Bootstrap app from scratch
JavaScript
4
star
54

jsocket

jsocket server and client stuff
JavaScript
4
star
55

sencha-livecoding

Sencha Touch 2 sample app for ParisJS live coding demo
JavaScript
4
star
56

django-picocms

Simplest django CMS ever :)
JavaScript
4
star
57

chrome-devtools-pixelperfect

🎨 Pixel Perfect Chrome Devtools extension
JavaScript
4
star
58

ora-promise

Use ora to monitor your promises execution time
JavaScript
3
star
59

oauth2-proxy-keycloak-demo

Sample setup for oauth2-proxy + keycloak
3
star
60

pdf-factory

PDF/HTML converter and assembler
Python
3
star
61

react-jspm-loader

Async load any jspm compatible React component into your app.
JavaScript
3
star
62

next-routes-examples

Sample app for next.js + named routes with next-routes
JavaScript
3
star
63

deputes-data

Extraction Wikidata des données des députés
Python
3
star
64

react-fuzzy-input-text

A simple search widget, that autocomplete your text inputs.
JavaScript
3
star
65

react-meetup-meetups

Fetch list of meetup.com meetups using their API and a ReactJS render prop.
JavaScript
3
star
66

infoclimat

Get weather data from infoclimat.fr API using NodeJS, or your browser.
JavaScript
3
star
67

MobileResizer

Chrome extension to resize your window based on mobile devices
JavaScript
3
star
68

sencha-wakanda-widgets

Sample Sencha widgets for wakanda studio
JavaScript
3
star
69

color-seed

Predictable colors generator from given seed(s)
JavaScript
2
star
70

backup-scripts

Shell
2
star
71

flask-vlc

HTTP video+message player
Python
2
star
72

pdftojpg

HTTP microservice on top of gm
JavaScript
2
star
73

httpapifs

httpapifs for pyfilesystem
Python
2
star
74

react-pouch-example

React + RxDB + Pouch example
JavaScript
2
star
75

web-dashboard

HTML
2
star
76

react-webpack-babel-minimal

Yet another minimal boilerplate for the react stack :)
JavaScript
2
star
77

html5-introduction

slides for the Paris HTML5 meetup
JavaScript
2
star
78

intro-web-javascript

JavaScript
2
star
79

cab

supa cab service
JavaScript
2
star
80

revolunet.github.io

revolunet blog (octopress based)
HTML
2
star
81

filebrowser-php-backend

simple php backend for http filebrowser [OUTDATED]
PHP
2
star
82

tm1637

Control a 4 digit led segments TM1637 driver using javascript and johnny-five.
JavaScript
2
star
83

candidats-2022

Comparatif des sites web des candidats à la présidentielle de 2022
HTML
2
star
84

grunt-sencha-resolver

Sencha dependencies detection
JavaScript
2
star
85

traefik-mermaid

A react component that renders your traefik network in real-time using mermaidjs
JavaScript
2
star
86

opentablatures

some tablatures for ukulele beginner
HTML
2
star
87

test-kontinuous

1
star
88

cordova-contentsync-demo

Cordova ContentSync + WkWebView PoC
HTML
1
star
89

jitsi-stream

Share your screen with a single url, powered by jitsi
TypeScript
1
star
90

sencha-meetup-introduction

Introduction for the first Sencha Paris Meetup
JavaScript
1
star
91

codebar-paris

1
star
92

url-watcher

Simple CLI to monitor website downtime.
JavaScript
1
star
93

promise-serial-exec

Execute promises sequentially, aka sequential Promise.all
JavaScript
1
star
94

www.3chameaux.com

Metalsmith website for 3chameaux.com
HTML
1
star
95

cordova-plugin-sdwebimage

Objective-C
1
star
96

jasmine-demo

Basic jasmine setup+demo
JavaScript
1
star
97

sellsy-proxy

Basic Sellsy API proxy for full client side apps.
JavaScript
1
star
98

soap2json-example

JavaScript
1
star
99

cordowrap

JavaScript
1
star
100

python-introduction

My talk for the French Python association on 29/11/2011
1
star