Has anyone managed to get an image previewer working in Ionic 2 as yet?
I am making an image gallery that when an image is selected, a previewer is displayed which allows you to then zoom in on the image. Pretty much basing my logic on this site.
I think Ionic team needs to create an example on how to work with the zoom on an ion-scroll. No matter what I do I cannot zoom on any type of image either as an img or a div with background-image.
If it helps, I used the (pinch) event explained here and then using the $event.scale property I could make a pinching kind of zoom div. I just multiply the scale property to the initial width and height of the div with the image. It is not perfect but it kinda does the trick for now until someone tells us how to use the ion-scroll zoom correctly.
Using the pinch event as I wrote in my previous comment and adding a timer to set the final width and height after the pinch event is over I could build a perfect Zoom experience to the user. It is a temporary fix of course.
Hey guys,
I got a little Problem with that photo-viewer plugin.
I Have no Url of the Image/Picture which I wanna show, I only got the Image as a Base64 string. It seems like its not possible to pass the String instead of the Url. (App crashes on trying to open the Image via Base64 string)
Does anyone no how I can use the plugin with a content string instead of an Url or is it just impossible to do this?
Your alternative seems pretty interesting but i rather need the picture to open on a button click than on clicking on an image. I want to display the image only on click and not in small and then display it big on clicking to it.