Code Monkey home page Code Monkey logo

angular-bootstrap-sortbutton's Introduction

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:

<za-sort-button za-sort-type="alpha" 
 za-sort-order-ascending="true"
 za-sort-event="sortEvent(isAscending)" 
 za-btn-class="btn btn-default btn-xs">
 </za-sort-button>

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...

angular-bootstrap-sortbutton's People

Contributors

christianulbrich avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.