mihnsen / ui-carousel

A simple, lightweight module for carousel in your AngularJS app, Inspired from slick carousel.
http://mihnsen.github.io/ui-carousel/
MIT License
77 stars 67 forks source link

ng-if ng-src not working #21

Open phtmalvinder opened 7 years ago

phtmalvinder commented 7 years ago

ng-if and ng-src are not working when written in

carousel-item

<ui-carousel flex layout="row" slides="ads" slides-to-show=3 slides-to-scroll=1 infinte="true" dots="true" autoplay="true">
        <carousel-item>
        <md-card>
              <video ng-if='item.attachment_type === "video/mp4" ' controls="controls" style="height: 250px;">
                <source ng-src="{{ item.banner_attachment }}" />
              </video>
              <img ng-if="item.attachment_type === 'image/png' || item.attachment_type === 'image/jpeg' || item.attachment_type === 'image/gif' || item.attachment_type === 'image/bmp' || item.attachment_type === 'image/jpg'" ng-src="{{ item.banner_attachment }}" class="md-card-image" style="max-width: 100%; width: auto; height: 250px;" />              
            <md-card-content>
                <p>{{ item.ad_description | limitTo: 50 }}</p>
            </md-card-content>
            <md-card-actions>

            </md-card-actions>
        </md-card>
        </carousel-item>
    </ui-carousel>
seanmalter commented 7 years ago

Same issue here, ng-show, ng-hide work just fine on the carousel items.