vasyabigi / angular-slick

Angular directive for slick-carousel
http://vasyabigi.github.io/angular-slick/
MIT License
500 stars 237 forks source link

What is the recommended way to use custom arrows? #55

Closed imdpk closed 8 years ago

imdpk commented 9 years ago

Here is a snippet of my code but for some reason it is not working.

angular.module('portfolioModule.controllers') .controller('PortfolioController', ['$rootScope', '$scope', function($rootScope, $scope){ $scope.prevArrow = '+'; $scope.nextArrow = '+'; ... ... );

alabels9 commented 9 years ago

Hi, I had the same issue of not knowing how to get my custom arrows in. Finally I figured it out. To my understanding, if you are using custom arrows (I was using web fonts to make the arrows) then you just need to pass a class defining the custom arrow into the prev-arrow and next-arrow attributes. In the example below I was using the .left and .right class. I tried to do it similar to how you were doing it in your snippet, but I also could not get that to work, but the solution below works. I hope this helps!

screen shot 2015-01-29 at 10 17 12 am

ghost commented 9 years ago

@alabels9

Thank you, you are a god/goddes! I've been searching for the solution 2 days and this is the only solution that works (and it isn't mentioned anywhere else).

Thank you!

SeyZ commented 9 years ago

Thanks @alabels9 !

DavidMMelin commented 9 years ago

At least I only wasted an hour before finding this, thanks @alabels9 !

pioku commented 8 years ago

Works, thanks.

imdpk commented 8 years ago

This worked thanks!

grothier commented 7 years ago

Hi @alabels9 ! I don't get it: where I am supposed to access the HTML? I am using the slick gem on rails, and can't find this in order to add a custom image for arrows... Thanks!

joeipe commented 7 years ago

This worked for me. Thank you.