Riron / ionic-img-viewer

Ionic 2+ component providing a Twitter inspired experience to visualize pictures.
MIT License
283 stars 118 forks source link

Not working on ionic 3.3.0/angular 4.1.2 #61

Closed julianCast closed 7 years ago

julianCast commented 7 years ago

Sofware version:

I can't make this plugin work. Touch the image and nothing happen. I'm using it like this:

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

@NgModule({
  imports: [
    IonicImageViewerModule
  ]
})

.html

<ion-header id="header-controls"><ion-navbar> <ion-title>
   <span>{{device.name}}</span>
</ion-title> </ion-navbar></ion-header>

<ion-content class="card-background-page" id="content-page">
  <img [src]="'https://url-image.jpg'" imageViewer />
</ion-content>

*It's kind of confusing that the plunker demo you provide and the instructions are different, using IonicImageViewerModule and ImageViewerDirective to be imported. Thank you!

dragonfire1119 commented 7 years ago

Currently the module does not work on 3.3.0 #56

If this did work with your version you would need to use IonicImageViewerModule.

If your using lazy loading you would need to have it in your {page}.module.ts instead of app.module.ts. It says on the README For Ionic 2 RC.0 and later => IonicImageViewerModule.

Riron commented 7 years ago

Please upgrade to ionic-img-viewer@2.3.0 to see if it fixes your problem. This new version should have support for ionic-angular@3.3.0.

Riron commented 7 years ago

And yes indeed the plunkr is outdated, I will update it. But it's rather a demo than a "how to" 😉

Alb93 commented 7 years ago

In my case @Riron's update works well. But I still have a problem. Nothing happen on click when the image is inside a super-tab page https://github.com/zyra/ionic2-super-tabs. Some advices?

Riron commented 7 years ago

@Alb93 please open a separate issue with some more details. Thanks !