Open 7martinelli opened 7 years ago
What do you mean by lazy loading ? Please provide some more details !
I think what he means is for pages lazy loaded with its ngModules, your directive or component breaks. As of today, with Ionic 3.5.3 it fails to support ionic-angular@3.5.2 for all loading methods.
try installing it on latest ionic project you will find an error stating:
UNMET PEER DEPENDENCY ionic-angular@3.5.2 └── ionic-img-viewer@2.4.0
I think you need to update it. Its not working for my project.
Great stuff though.
Lazy loading is a new feature introduced in ionic 3 and angular 4. By this, pages can be loaded only when first jump to.
Every page needs to be lazy loading, add a module wrapper to this page. So, to use this component with lazy loading, both import the IonicImageViewerModule into AppModule and the PageModule you used, it will works.
Tried that!!! Doesn't work!!!! Added IonicImageViewerModule to both AppModule and PageModule. No errors, no result, no console log.
Reinstalled it!!! Nothing!!!
Have you tested it recently?
I just did it last night. Maybe you missed something somewhere.
import { IonicImageViewerModule } from 'ionic-img-viewer';
...
@NgModule {
...
imports: [
IonicImageViewerModule, ...
]
}
import { IonicImageViewerModule } from 'ionic-img-viewer';
@NgModule({ ... imports: [ IonicImageViewerModule, IonicPageModule.forChild(PhotoSlidePage) ] })
3. Add imaegViewer attribute to img tag in template file of photo-slide.ts
<img [src]="photo.path" class="photo" imageViewer />
4. Enjoy it.
It should work for Base64 image string right? I am using the ImageViewerController but nothing shows up after clicking on the image. Using Ionic 3.5.0
@netsesame2 Also had to do that to get it working. Should have worked it with just adding it to the main app module but who knows...
@biskazz @Riron Same with me. I had expected it to word when only adding it to the page module. Which was sufficient for any other module that I use.
@satveshk works for me. Can you post your code? Have you tried with a jpg, does it work then, but not with Base64?
Please provide you version information :
Have you checked...
Lazy loading is not compatible with the plugin.