Angular-toggle-switch

AngularJS Toggle Switch

View the Project on GitHub cgarvis/angular-toggle-switch

angular-toggle-switch

Toggle Switches for AngularJS. Based off Bootstrap switch by Matt Lartentis.

Installation

Download angular-toggle-switch.min.js or install with bower.

$ bower install angular-toggle-switch --save

Load angular-toggle-switch.min.js then add the toggle-switch module to your Angular App.

angular.module('app', ['toggle-switch']);

Usage

Switch Value: {{switchState}}

Default

<toggle-switch ng-model="switchStatus"><toggle-switch>

Text

<toggle-switch
    ng-model="switchStatus"
    on-label="sí"
    off-label="no">
<toggle-switch>

Knob Text

<toggle-switch
    ng-model="switchStatus"
    knob-label="TV">
<toggle-switch>

Disabled

<toggle-switch
    ng-model="switchStatus"
    disabled="{{true}}">
<toggle-switch>