0.0.6 • Published 7 years ago

cs-photo-gallery v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

PHOTO GALLERY for Ionic 3

To see this in action, checkout the example project here.

NPM NPM

Installation

Install the module via NPM

npm i --save cs-photo-gallery

Import it in your app module

Import CsPhotoGalleryModule.forRoot() in your app main module

import { CsPhotoGalleryModule } from 'cs-photo-gallery';

@NgModule({
    ...
    imports: [
      ...
      CsPhotoGalleryModule.forRoot()
      ],
    ...
})
export class AppModule {}

Usage

CsPhotoGalleryController Provider

openCsPhotoGallery

openCsPhotoGallery(options?: ICsOptionsGallery): Observable<any>

OPTIONS

(optional) Advanced configuration.

ParamTypeDescriptionDefault
maxFilesnumberMaximum number of selectable files.30

Return

Object

{
  nativeURLs: [...]
}

Array of nativeURLs (String)

Examples

Simple Example

import { Component } from '@angular/core';
import { CsPhotoGalleryController } from 'cs-photo-gallery';

@Component({
  selector: 'test-page',
  templateUrl: './test.html'
})

export class TestPage {

  constructor(
    private _csPhotoGalleryCtrl: CsPhotoGalleryController
  ) {}

  openFileChooser() {
    this._csPhotoGalleryCtrl.openCsPhotoGallery()
      .subscribe(data => {
        console.log(data);
      });
  }
}

Example with all options

import { Component } from '@angular/core';
import { CsPhotoGalleryController } from 'cs-photo-gallery';

@Component({
  selector: 'test-page',
  templateUrl: './test.html'
})

export class TestPage {

  constructor(
    private _csPhotoGalleryCtrl: CsPhotoGalleryController
  ) {}

  openFileChooser() {
    let options = {
      maxFiles: 10
    };
    this._csPhotoGalleryCtrl.openCsPhotoGallery(options)
      .subscribe(data => {
        console.log(data);
      });
  }
}

Contribution

  • Having an issue? or looking for support? Open an issue and we will get you the help you need.
  • Got a new feature or a bug fix? Fork the repo, make your changes, and submit a pull request.

Support this project

If you find this project useful, please star the repo to let people know that it's reliable. Also, share it with friends and colleagues that might find this useful as well. Thank you :smile:

npm.io

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago