cs-photo-gallery
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

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.

Param Type Description Default
maxFiles number Maximum 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 😄



Package Sidebar

Install

npm i cs-photo-gallery

Weekly Downloads

1

Version

0.0.6

License

MIT

Last publish

Collaborators

  • eduardo526