@@ -27,11 +27,11 @@ angular.module('slick', [])
2727 infinite : " @"
2828 initialSlide : " @"
2929 lazyLoad : " @"
30- onBeforeChange : " & "
31- onAfterChange : " & "
32- onInit : " & "
33- onReInit : " & "
34- onSetPosition : " & "
30+ onBeforeChange : " = "
31+ onAfterChange : " = "
32+ onInit : " = "
33+ onReInit : " = "
34+ onSetPosition : " = "
3535 pauseOnHover : " @"
3636 pauseOnDotsHover : " @"
3737 responsive : " ="
@@ -88,9 +88,6 @@ angular.module('slick', [])
8888 infinite : scope .infinite isnt " false"
8989 initialSlide : scope .initialSlide or 0
9090 lazyLoad : scope .lazyLoad or " ondemand"
91- beforeChange : if attrs .onBeforeChange then scope .onBeforeChange else undefined
92- onReInit : if attrs .onReInit then scope .onReInit else undefined
93- onSetPosition : if attrs .onSetPosition then scope .onSetPosition else undefined
9491 pauseOnHover : scope .pauseOnHover isnt " false"
9592 responsive : scope .responsive or undefined
9693 rtl : scope .rtl is " true"
@@ -109,40 +106,40 @@ angular.module('slick', [])
109106 nextArrow : if scope .nextArrow then $ (scope .nextArrow ) else undefined
110107
111108
112- slider .on ' init' , (sl ) ->
109+ slider .on ' init' , (event , slick ) ->
113110 scope .onInit () if attrs .onInit
114111 if currentIndex?
115- sl .slideHandler (currentIndex)
112+ slick .slideHandler (currentIndex)
116113
117- slider .on ' reInit' , (sl ) ->
114+ slider .on ' reInit' , (event , slick ) ->
118115 scope .onReInit () if attrs .onReInit
119116
120- slider .on ' setPosition' , (sl ) ->
117+ slider .on ' setPosition' , (event , slick ) ->
121118 scope .onSetPosition () if attrs .onSetPosition
122119
123- slider .on ' swipe' , (sl ) ->
124- scope .onSwipe () if attrs .onSwipe
120+ slider .on ' swipe' , (event , slick , direction ) ->
121+ scope .onSwipe (direction ) if attrs .onSwipe
125122
126- slider .on ' afterChange' , (event , slick , currentSlide , nextSlide ) ->
127- scope .onAfterChange () if scope .onAfterChange
123+ slider .on ' afterChange' , (event , slick , currentSlide ) ->
124+ scope .onAfterChange (currentSlide ) if scope .onAfterChange
128125
129126 if currentIndex?
130127 scope .$apply (->
131128 currentIndex = currentSlide
132129 scope .currentIndex = currentSlide
133130 )
134131
135- slider .on ' beforeChange' , (sl ) ->
136- scope .onBeforeChange () if attrs .onBeforeChange
132+ slider .on ' beforeChange' , (event , slick , currentSlide , nextSlide ) ->
133+ scope .onBeforeChange (currentSlide, nextSlide ) if attrs .onBeforeChange
137134
138- slider .on ' breakpoint' , (sl ) ->
135+ slider .on ' breakpoint' , (event , slick ) ->
139136 scope .onBreakpoint () if attrs .onBreakpoint
140137
141- slider .on ' destroy' , (sl ) ->
138+ slider .on ' destroy' , (event , slick ) ->
142139 scope .onDestroy () if attrs .onDestroy
143140
144- slider .on ' edge' , (sl ) ->
145- scope .onEdge () if attrs .onEdge
141+ slider .on ' edge' , (event , slick , direction ) ->
142+ scope .onEdge (direction ) if attrs .onEdge
146143
147144 scope .$watch (" currentIndex" , (newVal , oldVal ) ->
148145 if currentIndex? and newVal? and newVal != currentIndex
0 commit comments