# com-poolgazal-imageviewer

> This plugin is intended to show a picture from an URL into a Image Viewer with zoom features.

Latest version **1.0.1** (published 2019-02-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install com-poolgazal-imageviewer
pnpm add com-poolgazal-imageviewer
yarn add com-poolgazal-imageviewer
bun add com-poolgazal-imageviewer
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-02-08 |
| First published | 2019-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 51.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Moussa Mokhtari |
| Maintainers | moussa-m |
| Keywords | cordova, imageviewer, ecosystem:cordova, cordova-android, cordova-ios |

## Links

- npm: https://www.npmjs.com/package/com-poolgazal-imageviewer
- Repository: https://github.com/poolgazal/imageviewer
- Homepage: https://github.com/poolgazal/imageviewer#readme
- Issues: https://github.com/poolgazal/imageviewer/issues
- npm.io page: https://npm.io/package/com-poolgazal-imageviewer

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-02-08
- 1.0.0 — 2019-02-02

## README

# Image Viewer  
> This plugin is intended to show a picture from an URL into a image Viewer with zoom features.

## How to Install

Cordova:
```bash
cordova plugin add com-poolgazal-imageviewer
```

Ionic 4:
```bash
$ ionic cordova plugin add com-poolgazal-imageviewer
$ npm install --save ionic-native-image-viewer
```

### Android
> Out of the box


### API

#### Show an image "ionic local server uri"

```
ImageViewer.show('http://localhost:8080/assets/any_image.png', 'Some Title');
```
##### Usage
```
...
import { ImageViewer } from 'ionic-native-image-viewer/ngx'
...
@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
  ],
  providers:[ImageViewer,],//here
  declarations: [PagePage]
})
export class MyModuleModule {}


```
Inject it in your component like so 
```
....
import { ImageViewer } from 'ionic-native-image-viewer/ngx'
....
constructor(private imageViewer:ImageViewer){

}
ngOnInit() {
//handling all images click event
$('body').on('click', 'img',(event)=>{
        this.imageViewer.show(event.target.src);
})

}
```


Optionally you can pass third parameter option as object.

Options:
* share: Option is used to hide and show the share option.
* closeButton: Option for close button visibility when is set to false 


```
var options = {
    share: true, // default is false
    closeButton: false // default is true
};

ImageViewer.show('http://any_site.com/any_image.png', 'Some Title', options);
```

---
_Source: https://npm.io/package/com-poolgazal-imageviewer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
