Socket
Socket
Sign inDemoInstall

ionic-modal-slider

Package Overview
Dependencies
20
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ionic-modal-slider

Ionic Modal Slider (to preview photos)


Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Ionic Modal Slider

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

Installation

Install it using npm

npm install ionic-modal-slider --save

and then, within your application module

import * as ionicGalleryModal from 'ionic-modal-slider';
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-modal-slider';

let modal = this.modalCtrl.create(GalleryModal, {
  photos: photos,
  initialSlide: index,
  onDissmiss: () => {
    alert('Event on dismiss modal');
  }
});
modal.present();

Options

The possible options for it are:

{
  photos: Array[],
  initialSlide: number,
  onDissmiss: () => {
    alert('Event on dismiss modal');
  }
}

Array = [{
  type: 'photo',
  url: 'https://images.pexels.com/photos/207171/pexels-photo-207171.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb',
  title: 'Lorem ipsum',
  date: '11/11/2011',
  listing: 'Hotels',
  user: 'John',
  toListingPageID: '11',
  eventTapOnTitle: 'gotoListing',
  avatarUrl: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlNQ2yyZICBI_pcqc_KxT55FYvlpE8TtOKTlVuNuVyjbr1BSwLhw'
}, {
  type: 'video',
  url: 'https://www.youtube.com/embed/60ItHLz5WEA',
  title: 'lorem ipsum dolor sit amet',
  date: '11/11/2011',
  listing: 'Hotels',
  user: 'John',
  toListingPageID: '12',
  eventTapOnTitle: 'gotoListing',
  avatarUrl: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlNQ2yyZICBI_pcqc_KxT55FYvlpE8TtOKTlVuNuVyjbr1BSwLhw'
}];

Keywords

FAQs

Last updated on 03 Nov 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc