Skip to content

Commit

Permalink
Updated readme, added method details, added options details, minor cl…
Browse files Browse the repository at this point in the history
…eanup
  • Loading branch information
benjamincharity committed Jan 3, 2016
1 parent ccd76dd commit 5a0fde8
Showing 1 changed file with 62 additions and 15 deletions.
77 changes: 62 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,80 @@

## Demo

http://plnkr.co/edit/gFwwJf?p=preview
[http://plnkr.co/edit/gFwwJf?p=preview](http://plnkr.co/edit/gFwwJf?p=preview)


## Flickity
## Options

> Touch, responsive, flickable galleries.
This directive supports all options for version `1.1.2` of Flickity. A full list of options can be
found here: [Flickity Options](http://flickity.metafizzy.co/options.html).

- [Flickity on Github](https://github.com/metafizzy/flickity)
- [Flickity Docs](http://flickity.metafizzy.co/)
The naming convention is to simply take the option name (eg. `cellSelector`), convert it to
[kebab-case](http://stackoverflow.com/a/12273101/722367) (eg. `cell-selector`) and add the
`flickity-` prefix.

Setting the option `initialIndex` would look like this:

```
<div
bc-angular-flickity
flickity-initial-index="3"
>
<!-- slides -->
</div>
```


## Methods

### Next

The directive `bc-flickity-next` is provided to call the `next()` method on the Flickity instance.

```
<button bc-flickity-next>Next</button>
```

You can also pass in an optional parameter to control the looping.

```
// If true, the first cell will be selected if at the last cell.
// If false, it will do nothing when at the last cell.
<button bc-flickity-next="true">Next</button>
```

### Previous

## Scripts
The directive `bc-flickity-previous` is provided to call the `previous()` method on the Flickity
instance.

```
<button bc-flickity-previous>Previous</button>
```

You can also pass in an optional parameter to control the looping.

```
// If true, the last cell will be selected if at the first cell.
// If false, it will do nothing when at the first cell.
<button bc-flickity-previous="true">Previous</button>
```


- - -


### Scripts

* `npm run build` - produces production version of your library under the `lib` folder
* `npm run dev` - produces development version of your library and runs a watcher


## Details

* Webpack based ([source](https://github.com/krasimir/webpack-library-starter)).
* ES6 as a source.
* Exports in a [umd](https://github.com/umdjs/umd)
* Linting with [ESLint](http://eslint.org/).
### About Flickity.js

> _Touch, responsive, flickable galleries._
## TODO
- [Flickity on Github](https://github.com/metafizzy/flickity)
- [Flickity Docs](http://flickity.metafizzy.co/)

- Enable [Flickity methods](http://flickity.metafizzy.co/api.html)
- Better docs

0 comments on commit 5a0fde8

Please sign in to comment.