GithubHelp home page GithubHelp logo

batguyz / ion-gallery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pedroabreu/ion-gallery

0.0 2.0 0.0 199 KB

Ionic gallery directive

License: MIT License

JavaScript 87.44% CSS 6.70% HTML 5.86%

ion-gallery's Introduction

ion-gallery

Ionic gallery with slider

Demo availabe in Ionic View with id 150745FE

$ bower install --save ion-gallery

Features

  • Define number of collums to present (1 to array length)
  • Pinch and double tap do zoom on picture

Usage

Load script and css on the html

<link href="lib/ion-gallery/dist/ion-gallery.css" rel="stylesheet">
...
<script src="lib/ion-gallery/dist/ion.gallery.min.js"></script>

Add ion-gallery as dependency to your project

angular
 .module('starter', ['ionic','ion-gallery'])

Add gallery directive with array of photos:

<ion-gallery ion-gallery-items="items"></ion-galllery>

Data source example

$scope.items = [
  {
    src:'http://www.wired.com/images_blogs/rawfile/2013/11/offset_WaterHouseMarineImages_62652-2-660x440.jpg',
    sub: 'This is a <b>subtitle</b>'
  },
  {
    src:'http://www.gettyimages.co.uk/CMS/StaticContent/1391099215267_hero2.jpg',
    sub: '' /* Not showed */
  },
  {
    src:'http://www.hdwallpapersimages.com/wp-content/uploads/2014/01/Winter-Tiger-Wild-Cat-Images.jpg'
  }
]

Subtitle property is optional. If no property present, nothing is showed (Same for empty string). Supports html tags.

Config

  • ion-gallery-row: Defines number of collums to display. Default 3

        <ion-gallery ion-gallery-items="items" ion-gallery-row="5"></ion-galllery>
    
  • ion-gallery-toggle: Sets one tap action on slideshow to hide/show subtitles and "Done" button. Default: true

        <ion-gallery ion-gallery-items="items" ion-gallery-toggle="false"></ion-galllery>
    

ion-gallery's People

Contributors

pedroabreu avatar

Watchers

 avatar  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.