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
Post a Comment