angular-carousel icon indicating copy to clipboard operation
angular-carousel copied to clipboard

ng-style with background image

Open Valonix opened this issue 7 years ago • 2 comments

Hi there. Can i use something like this?

<ul class="slider__list" rn-carousel rn-carousel-index="$ctrl.carouselIndex" rn-carousel-controls rn-carousel-controls-allow-loop > <li ng-repeat="slide in $ctrl.slides track by slide.id" class="slide" ng-style="{'background-image': 'url(/images/slides/' + slide.image + ')'}"> <div class="slide-wrap"> <img class="img-responsive" ng-src="/images/logos/{{$ctrl.logo}}.svg" alt=""> <p>{{slide.body}}</p> </div> </li> </ul>

Because right now i didn`t see backgound image..

Valonix avatar Oct 04 '16 19:10 Valonix

so? any ideas?

Valonix avatar Oct 07 '16 11:10 Valonix

Yes you can but ng-style accept an expression, should be like this ng-style="{'background-image': 'url(/images/slides/{{slide.image}})'}".

auxcoder avatar Jan 22 '17 16:01 auxcoder