Giter VIP home page Giter VIP logo

ionic-gallery-modal's Introduction

npm NPM Version NPM Downloads

Ionic Gallery Modal

It consists of a modal that will help you make gallery preview modal. Last tested with Ionic 3.13.0

Demo

demo-ionic-3-gallery-modal

Example

Installation

Install it using npm

npm install ionic-gallery-modal --save

and then, within your application module

import * as ionicGalleryModal from 'ionic-gallery-modal';
import { HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';

and add the GalleryModalModule to your imports

imports: [
  //...
  ionicGalleryModal.GalleryModalModule,
  //...
],

and to your providers

providers: [
  //...
  {
    provide: HAMMER_GESTURE_CONFIG,
    useClass: ionicGalleryModal.GalleryModalHammerConfig,
  },
  //...
],

Usage

To open the module just use the Ionic ModalController

import { ModalController } from 'ionic-angular';
import { GalleryModal } from 'ionic-gallery-modal';
let modal = this.modalCtrl.create(GalleryModal, {
  photos: photos,
  initialSlide: index
});
modal.present();

Options

The possible options for it are:

{
  photos: Array[{ 
    url: string, 
    type: string,
  }],
  closeIcon: string,
  initialSlide: number,
}

Problems or suggestions

Let us know or submit a PR! And, please, don't hesitate to contribute. ❤️

Changelog

v0.2.1

  • Fixed a bug which caused the production build to not work

v0.2.0

  • Changed to work with Ionic 3.5
  • Added the GalleryModalModule
  • Made it possible to close the modal by swiping down
  • Gallery items can now have title (as a description)

v0.1.0

  • Changed to work with Ionic 3.2
  • Fixed an issue that was causing an error when building ionic app with --prod flag on
  • Changed the whole building system for the plugin

v0.0.7

  • Changed to work with Ionic 2 RC-5
  • Made a temporary fix for orientationchange bug in ios
  • Fixed a problem that was causing apps to not build

Credits

Ciprian Mocanu - @nikini

ionic-gallery-modal's People

Contributors

nikini avatar epicfaace avatar chdanielmueller avatar danielsogl avatar kctang avatar

Stargazers

Zhu Guoliang avatar

Watchers

James Cloos 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.