Closed cupidi closed 7 years ago
I came here to open a pull request that's almost identical! The difference with mine is that I used a different attribute (zoom) rather than src. How do you avoid the src input conflicting with the native src?
The "right" way to do it is probably with srcset, but that opens a whole load of complexity.
Great idea !
@ascorbic it's done thanks to @Input('imageViewer') src
. The value of imageViewer
is binded to src
. eg: <img imageViewer="zoomedImage.jpg" src="smallImage.jpg" />
Hi!
I did this change because sometimes you need to display an image from a different source. For example you have a low res thumbnail in your element but on click you want to display the original.
Regards, Mario