0.5.0 • Published 10 years ago
angular-sort-button v0.5.0
angular-sort-button
A simple and lightweight angular sort button component.
Usage
Install
npm install angular-sort-buttonInclude
angular.module('fancyStuffModule', [
'apinnecke.sort-button'
]);or if you're using browserify of something like that:
angular.module('fancyStuffModule', [
require('angular-sort-button')
]);<tr>
<th><sort-button order="order" value="city">City</sort-button></th>
<th><sort-button order="order" value="price">Price</sort-button></th>
<th><sort-button order="order" value="status">Status</sort-button></th>
<th><sort-button order="order" value="color">Color</sort-button></th>
</tr>Parameter order has two properties: order (which contains the name from current ordering column) and reverse (which contains the boolean flag, weather it is reverse or not).