jquery - Unable to load images for RoyalSlider in Angular -


an angular app loads images after user action so:

<div class="royalslider rsdefault" royalslider>   <img class="rsimg" ng-repeat="i in selectedasset[0].images" ng-src="{{ }}" /> </div> 

in trying use royalslider jquery plugin, used directive:

app.directive('royalslider', function() {     var linker = function (scope, element, attrs) {         scope.$watch('selectedasset', function(){             element.royalslider({                 keyboardnavenabled: true,                 autoscaleslider: true,                 autoheight: true             });         });     };     return {         restrict: 'aec',         link: linker     } }); 

the problem above deletes images dom when royalslider instantiated.

what missing?

you not calling directive right in view. use this:

<div class="royalslider rsdefault" royal-slider>   <img class="rsimg" ng-repeat="i in selectedasset[0].images" ng-src="{{ }}" /> </div> 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -