Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

modal-slider-photos-and-videos

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modal-slider-photos-and-videos

modal slider photos and video

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

modal-slider-photos-and-videos

Use for ionic 2

Installation

npm i --save modal-slider-photos-and-videos

Config in the app.module.ts

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

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

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

Usage in the component

import { ModalController } from 'ionic-angular';
import { GalleryModal } from 'modal-slider-photos-and-videos';

constructor(
    //...
    public modalCtrl: ModalController,
    //...
){}

Slider photos:

let modal = this.modalCtrl.create(GalleryModal, {
  typeModal: "photo",
  photos: array_photo,
  initialSlide: currentIndex
});
modal.present();

Slider videos:

let modal = this.modalCtrl.create(GalleryModal, {
  typeModal: "video",
  videos: array_video,
  initialSlide: currentIndex
});
modal.present();

Option

NameTypeValueDescription
typeModalstring"photo"when use slider for photos
typeModalstring"video"when use slider for videos
photosarray[]is array information of all photos
videosarray[]is array information of all videos
initialSlidenumber0pass params is index of a photo or a video need show
Option of array photos
NameTypeValueDescription
urlstringlink of photo
avatarstringlink image avatar of user post this photo
namestringname of user post this photo
titlestringtitle of this photo
datestringdate published this photo

Example

{
  url: "http://example.com/images/photo_1.jpg",
  avatar: "http://example.com/avatar/david.jpg",
  name: "David Beckham",
  title: "Goal Goal!",
  date: "3 months ago"
}
Option of array videos
NameTypeValueDescription
urlstringlink local of video
posterstringlink of image show before play video
avatarstringlink image avatar of user post this video
namestringname of user post this video
titlestringtitle of this video
datestringdate published this video

Example

{
  url: "http://abc.com/media/video.mp4",
  poster: "http://example.com/poster/juventus.jpg",
  avatar: "http://example.com/avatar/buffon.jpg",
  name: "Buffon",
  title: "Save save!",
  date: "3 months ago"
}

Keywords

FAQs

Package last updated on 30 Sep 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc