Tute buttons (a.k.a Tuttons)
(pronounced: "tootins")
Loading button
A button that handles the state changing logic of replacing the button text and toggling a loading class. Example usage:
API:
loadingClass: '@' //string, CSS class that gets added when the button is loading. Default: 'btn-is-loading'loading: '=' //bool, toggles loading/normal stateloadingText: '=' //string, text to change button when in loading statetext: '=' //string, default button text
Radio group buttons
Based on bootstrap's radio button group: http://getbootstrap.com/javascript/#buttons. Uses bootstrap's classes.
API:
/*buttons should look like: [ { label: 'Option 1', value: 1, preselected: true //makes this one selected initially }, { label: 'Option 2', value: 2, classes: 'btn-primary' }] */buttons: '='
Install
bower install tute-buttons
Include in your app:
angular;
Developing
Run ./dev-server.sh
to serve it locally.
Run gulp
to watch and re-build it.