An AngularJS Directive for Switchery.
switchery/dist/switchery[.min].css
from your vendors/components folder in your links.switchery/dist/switchery[.min].js
from your vendors/components folder in your scripts.ng-switchery.js
in your scriptsui-switch
attribute to a checkbox.Declare a dependency on the module
angular.module('myModule', ['NgSwitchery']);
Insert checkbox html
<input type="checkbox" class="js-switch" ui-switch checked />
Setting Options
<input type="checkbox" class="js-switch" ui-switch="{color: '#E43B11', secondaryColor: '#F89279'}" />
Disable switch
<input type="checkbox" class="js-switch" ui-switch ng-disabled="isDisabled" />
Bower install
bower install ng-switchery
You may also wish to look at how to achieve this with pure CSS.
This project is still in its very early stages and should not be considered production ready.
At this time we are no longer using this project, but will continue to maintain it until someone else agrees to take over. This means that updates will be slow as this is not a priority for us. New releases will be made as our team has time to volunteer to the project.