angular-switcher-v0.2.1

Angular Switcher is an AngularJS directive that models toggle switches.
2 people use it
Author: 1561134?v=3 indrimuska

Angular Switcher

Join the chat at https://gitter.im/indrimuska/angular-switcher

Angular Switcher is an AngularJS directive that models toggle switches.

Check out the demo page: http://indrimuska.github.io/angular-switcher.

Angular Switcher

Installation

html

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.js"></script>

<script src="js/vendor/angular-switcher/dist/angular-switcher.min.js"></script>

<link href="css/vendor/angular-switcher/dist/angular-switcher.min.css" rel="stylesheet">

javascript

var app = angular.module('MyApp', ['switcher']);

Demo

http://indrimuska.github.io/angular-switcher

Options

ng-model - Assignable angular expression to data-bind to.

ng-disabled - If the expression is truthy, it disable the switcher.

true-value - The value to which the expression should be set when selected (default: true).

false-value - The value to which the expression should be set when not selected (default: false).

true-label - HTML expression label assigned to the selected value (default: On).

true-label - HTML expression label assigned to the unselected value (default: Off).

Events

ng-change(newValue, oldValue) - Fired every time the switch has been toggled.

License

Copyright (c) 2015 Indri Muska. Licensed under the MIT license.

comments powered by Disqus
This page was last updated 11 months ago.