Skip to content

Latest commit

 

History

History
70 lines (45 loc) · 1.3 KB

README.md

File metadata and controls

70 lines (45 loc) · 1.3 KB

Image viewer for Ionic2

Ionic 2 plugin providing a Twitter inspired experience to visualize pictures.

Plugin preview

Features

  • Tap on the pic to see it fullscreen
  • Slide up/down to close the view
  • Tap on the navigation arrow to close the view
  • Double tap on the pic when open to zoom

Demo

Demo on Plunkr

Installation

Make sure you have Ionic and Angular installed.

npm install --save ionic-img-viewer

For Ionic 2 RC.0 and later:

import { IonicImageViewerModule } from 'ionic-img-viewer';

@NgModule({
  imports: [
    IonicImageViewerModule
  ]
})
export class AppModule {}

For Ionic 2 beta version:

Import the image viewer directive in your component.

import { ImageViewerDirective } from 'ionic-img-viewer';


@Component({
  template: `<img [src]="url" imageViewer />`,
  directives: [ImageViewerDirective]
})
class MyComponent {

}

Usage

Add the imageViewer property to the pictures.

<img src="IMAGE_URL" imageViewer />

Contributing

See CONTRIBUTING.md.

Thank you, contributors!