elevateweb / elevatezoom

1.03k stars 492 forks source link

Any known issues using this with angularJS? #121

Open spupett opened 9 years ago

spupett commented 9 years ago

I've not been able to get this to work with angular.

<img id="zoom_01" class="img-responsive center-block" ng-src="{{imageCtrl.img}}" ng-class="{hidden: !imageCtrl.img}" data-zoom-image="{{imageCtrl.img}}"/>

                <script>
                    $("#zoom_01").elevateZoom();
                </script>

I'm wondering if it's because of the {{ }} or because I don't have an explicit src attribute.

igorlino commented 8 years ago

@spupett Angular works a bit different, so you need a good wrapper.

Take a look:

https://github.com/igorlino/angular-elevatezoom-plus

there are plenty of angular-based examples in the demo page

igorlino commented 8 years ago

And yes, there were some angular-specific problems, but have now been solved in the latest EZP version.