Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zalari/angular-bootstrap-sortbutton

SortButton directive, based on angular 1.x+ and bootstrap 3.x+
https://github.com/zalari/angular-bootstrap-sortbutton

Last synced: 15 days ago
JSON representation

SortButton directive, based on angular 1.x+ and bootstrap 3.x+

Awesome Lists containing this project

README

        

angular-bootstrap-sortbutton
============================

SortButton directive, based on angular 1.x+ and bootstrap 3.x+

### Using

The directive can be used with its name or as an attribute:

```


```

### Options

The attributes are as following:

* *za-sort-type* can either be **alpha**, **numeric** or empty to display the corresponding sort glyphicon
* *za-sort-order-ascending* determines the initial sort order; when it is true, *ascending* order is assumed; **must be present** for the time being
* *za-sort-event* can be a scope function that gets called, whenever the sorter has been clicked, and passed with the current sortOrder; *optional*
* *za-btn-class* is a list of preferrably bootstrap classes that can be used for additional styling (e.g. small buttons); the default value is *btn btn-default*

### Notes

- has not been extensively tested with older bootstrap releases; but as along as the glyphicons are present, it should work. The same applies to older Angular releases; it should work with Angular 1.0.x as well - keep your fingers crossed.

- as the directive is using the bootstrap-glyphicons (and classes), some recent 3+ version of bootstraps needs to be loaded for the styling; apart from that no additional JS is needed (i.e. no bootstrap JS).

### TODO

* update build process for minifying angular-js directive... ; uglify does not work. PRs are welcome...