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

How to add an external template into tag carousel-item #38

Open ivanferrer opened 6 years ago

ivanferrer commented 6 years ago
<ui-carousel
     slides="steps"
     slides-to-show="1"
     slides-to-scroll="1"
     autoplay="false"
     autoplay-speed="2000"
     infinite="false"
     initial-slide="0"
     dots="false">
<carousel-item>
     <p><img ng-src="{{item.image}}"></p>
     <div ng-include="'content_gallery.html'"></div>
</carousel-item>
</ui-carousel>

 <script type="text/ng-template" id="content_gallery.html">
    <div>
        <div ng-repeat="category in collection_category">
            <a href="javascript:void(0)" ng-click="checkItem(category)"><i class="{{category.icon}}" ng-class="{active:category.active == true}"></i> {{category.title}}</a>
        </div>
    </div>
</script>