import {Component, Directive, ElementRef, Host, Optional, NgControl, Inject, forwardRef} from 'angular2/angular2'; import {Form} from '../../util/form'; import {Config} from '../../config/config'; import {pointerCoord} from '../../util/dom'; /** * @private */ @Directive({ selector: 'media-switch', host: { '[class.switch-activated]': 'swtch.isActivated' } }) class MediaSwitch { /** * TODO * @param {Switch} swtch TODO * @param {} elementRef TODO * @param {Config} config TODO */ constructor( @Host() @Inject(forwardRef(() => Switch)) swtch: Switch, elementRef: ElementRef ) { swtch.switchEle = elementRef.nativeElement; this.swtch = swtch; } } /** * @name Switch * @description * A switch technically is the same thing as an HTML checkbox input, except it looks different and is easier to use on a touch device. Ionic prefers to wrap the checkbox input with the `