NivoSlider isn't working with base64 images loaded by AngularJS -


When I use nivoSlider with static images, it works like a magic: < Pre> & lt; Div class = "slider-cover" & gt; & Lt; Div id = "slider" class = "nivoSlider" & gt; & Lt; img src = "img / someimage.jpg" alt = "" / & gt; & Lt; / Div & gt; & Lt; / Div & gt;

When I try to load the gallery image with some dynamic base 64 image (via finger), then it does not work:

 < Code> 
div class = "slider-wrapper" & gt; & Lt; Div id = "slider" class = "nivoSlider" & gt; & Lt; img data-ng-repeat = "file in files" src = "{{file.content}}" alt = "" /> & Lt ;! - or - & gt; & Lt; Img data-ng-repeat = "file in files" data-ng-src = "{{file.content}}" alt = "" /> & Lt; / Div & gt; & Lt; / Div & gt;

is using data-ng-repeat in a separate content

   & Lt ;! - or - & gt; & Lt; Img data-ng-repeat = "file in files" data-ng-src = "{{file.content}}" alt = "" />   

Am I doing wrong? thanks all!

You must provide the instructions that will initialize the nivo slider for you:

Pre> angular Modules ('myApp') instructions ('nivoSlider', function) {return {link: function ($ scope, elem) {$ scope. $ Apply (function () {$ (elem) .nivoSlider ();}}}}}

Template:

  & lt; Div class = "slider-vepe" & gt; & Lt; nivo-slider id = "slider" class = "nivoSlider" & gt; & Lt; Img data-ng-repeat = "file in files" data-ng-src = "{{file.content}}" alt = "" /> & Lt; / Nivo-slider & gt; & Lt; / Div & gt;   

(not tested)

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -