cs-photo-gallery
v0.0.6
Published
Select photos
Downloads
2
Maintainers
Readme
PHOTO GALLERY for Ionic 3
To see this in action, checkout the example project here.
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 :smile: