W
W
whatislove2015-10-28 14:49:20
Angular
whatislove, 2015-10-28 14:49:20

Why doesn't the slick gallery (and any other) work when using ng-repeat, Angularjs?

I tried a bunch of different galleries, from the most popular owl and angular-slick The
question is the following
1. when outputting via html, everything works.
For example:

slick id = "slide">
  <div><img src="{{bike.gallery[1]}}" alt=""></div>
  <div><img src="{{bike.gallery[2]}}" alt=""></div>
  <div><img src="{{bike.gallery[3]}}" alt=""></div>
</slick>

2. when outputting through ng-repeat, nothing works, it displays pictures but there is no gallery
<slick>
    <div ng-repeat="bike_one in bike.gallery" >
           <img src="{{ bike_one}}" alt="" class="img-responsive">
    </div>
</slick>

Why is this happening and how to solve this issue?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2015-10-28
@miraage

I am 100% sure that you are declaring the slider via the jQuery way.
stackoverflow.com/questions/14994391/thinking-in-a...

A
Andrew, 2015-10-28
@R0dger

well, at least replace src with ng-src

<img ng-src="{{ bike_one}}" alt="" class="img-responsive">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question