You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,10 @@ Release: 2.0
9
9
was working but arbitrary. We now register a simple `onFinishRender` directive which
10
10
allows us to postpone slickification until `ng-repeat` has finished execution.
11
11
2.**[BC-BREAK]** The directive is no longer based on a transclude functionality. You can either use the 2.0
12
-
directive with the provided template or use your own (with [slick-no-tpls.js](dist/slick-no-tpls.js)). When using
13
-
the latter option, refer to [slick.coffee](https://github.com/kbdaitch/angular-slick-carousel/blob/master/src/slick.coffee#L12-L18) and ensure your template uses `on-finish-render=init()` in its `ng-repeat` element.
14
-
3. The two functions `isImage` and `isVideo` on the directive's scope are provided for use in the template,
15
-
and are overridable.
16
-
4.**[BC-BREAK]** The directive no longer supports statically provided image assets out-of-the-box.
12
+
directive with the provided template or use your own (when using the `src` attribute).
13
+
3.**[BC-BREAK]** The directive no longer supports statically provided image assets out-of-the-box.
17
14
The dynamic usecase is what it tries to solve optimally.
18
-
5. You should now use JS to specify a variety of sources in the `media` array. See [example](https://github.com/kbdaitch/angular-slick-carousel/blob/master/example/index.html).
19
-
6. The use of `on-directive-init` attribute introduced earlier is now in the demo. Use this to use the handle object to do something on directive init. This is different from the underlying `slick.js``onInit` in that the handle object is now ready to use
20
-
(with all the setup to call underlying `slick.js` calls).
15
+
4. You should now use JS to specify a variety of sources in the `media` array. See [example](https://github.com/kbdaitch/angular-slick-carousel/blob/master/example/index.html).
21
16
22
17
Usage
23
18
-----
@@ -30,12 +25,22 @@ as either a `<div>` attribute or a `<slick>` element.
30
25
<slicksettings="scoped-settings"
31
26
control="scoped-control-handle"
32
27
media="media"
28
+
src="optionalCustomTemplate.html"
33
29
on-directive-init="onDirectiveInit()"
34
30
is-image="isImage(media)"
35
31
is-video="isVideo(media)>
36
32
</slick>
37
33
```
38
34
35
+
### Attributes ###
36
+
1. `settings`: optional `Object` containing any of the slick options. Consult [here](http://kenwheeler.github.io/slick/#settings).
37
+
2. `control`: optional `Object` discussed [#control](below) in detail
38
+
3. `media`: mandatory `Array` of images and/or video
39
+
4. `src`: optional `String` the url for the custom template, if desired
40
+
4. `on-directive-init`: optional `Function` the directive's handle object is ready to use in this function. This is different from `slick`'s `onInit` handler.
41
+
5. `is-image`: optional `Function` that takes a metadata object and returns a `Boolean`
42
+
6. `is-video`: optional `Function` that takes a metadata object and returns a `Boolean`
43
+
39
44
### Steps ###
40
45
1. Include the `slick.js` at the base of this repo, or install through `bower`:
0 commit comments