/**
* @ngdoc directive
* @name ionToggle
* @module ionic
* @codepen tfAzj
* @restrict E
*
* @description
* A toggle is an animated switch which binds a given model to a boolean.
*
* Allows dragging of the switch's nub.
*
* The toggle behaves like any [AngularJS checkbox](http://docs.angularjs.org/api/ng/input/input[checkbox]) otherwise.
*
* @param toggle-class {string=} Sets the CSS class on the inner `label.toggle` element created by the directive.
*
* @usage
* Below is an example of a toggle directive which is wired up to the `airplaneMode` model
* and has the `toggle-calm` CSS class assigned to the inner element.
*
* ```html
* Airplane Mode
* ```
*/
IonicModule
.directive('ionToggle', [
'$ionicGesture',
'$timeout',
function($ionicGesture, $timeout) {
return {
restrict: 'E',
replace: true,
require: '?ngModel',
transclude: true,
template:
'