devmark / angular-slick-carousel

Angular directive for slick-carousel
http://devmark.github.io/angular-slick-carousel/
MIT License
353 stars 125 forks source link

Dynamic Settings #55

Closed ronildo closed 8 years ago

ronildo commented 8 years ago

I have two carousels in my page, they are inside a ng-repeat. I need the ability to delete items from it.

Is that possible?

devmark commented 8 years ago

take a look : https://github.com/devmark/angular-slick-carousel#slide-data

ronildo commented 8 years ago

Let me put my code here so you can understand what I'm talking about:

<div ng-repeat="item in items">
  <slick slides-to-show="4" settings="configs">
  </slick>
</div>

How can I remove slides from carousel one or carousel two (considering my ng-repeat is iterating two times).

I hope my question my more clear now :)

ps: Thank you so much for you great work here.

devmark commented 8 years ago

Sorry, for delay.

$scope.slicks = [{name: 'slick1', enabled: true}, {name: 'slick2', enabled: true}, {name: 'slick3', enabled: true}];
 <div ng-repeat="slick in slicks">
    <slick data="number" settings="slickConfig" ng-if="slick.enabled">
        <div ng-repeat="i in number">
            <div class="row" ng-include="'tpl.html'"></div>
        </div>
    </slick>
    <button ng-click="slick.enabled=!slick.enabled" class="btn">toggle enabled </button>
</div>

this work for you?

aszmyd commented 8 years ago

Hi Guys, to simplify explaining such stuff i think we should preparing some code examples. I've created starting template for angular-slick-carousel script here: http://codepen.io/aszmyd/pen/LGdoyV Feel free to fork it and prepare some examples of use cases.

GrofGraf commented 8 years ago

Hello again mr. Devmark. Thank you for your help so far. I came to another issue I can't resolve. I have slick with dynamic data in infinite mode. I would like the numbers to increment or decrement, regarding the direction slick is moving. Although my data changes, slick is reseting to default values everytime i hit the edge, is there any way to fix this? Here is my plunker: http://plnkr.co/edit/mzbO1e?p=preview

devmark commented 8 years ago

open it if need any help

sumeetmobiwebtech commented 6 years ago

I have two carousels in my page, they are inside a ng-repeat. But when a slide first slider then second slider is also sliding automatically. i do not need that second slider automatically slide. Can anyone tell me how to resolve ?

GrofGraf commented 6 years ago

@sumeetmobiwebtech I created a new Plunker fork with two carousels for you. Hope it can serve you as a starting point. If you want more help, better elaborate your problem (demo example would be a nice start).

http://plnkr.co/edit/x1fVH1NSrOL2EyvGozYz?p=preview

sumeetmobiwebtech commented 6 years ago

@GrofGraf

When it come from dynamic,this is i am using

{{product.product_name}}
₹ {{product.product_price_flipkart}} INR
GrofGraf commented 6 years ago

At first glance it looks like this is happening because you reference a class for sliding prev-arrow=".left" next-arrow=".right", that is contained on every link. Maybe change a class reference to dynamic ID.

@sumeetmobiwebtech please make a demo. You could fork these:

http://codepen.io/aszmyd/pen/LGdoyV http://plnkr.co/edit/9goFW6?p=preview

sumeetmobiwebtech commented 6 years ago

@GrofGraf

Thanks you so much

You save my lot of time Thanks again