import {Component, Directive, ElementRef, Host, Optional, Inject, forwardRef} from 'angular2/core'; import {NgControl} from 'angular2/common'; import {Form} from '../../util/form'; import {Config} from '../../config/config'; import {pointerCoord} from '../../util/dom'; /** * @private */ @Directive({ selector: '.toggle-media', host: { '[class.toggle-activated]': 'toggle.isActivated' } }) class MediaToggle { /** * TODO * @param {Toggle} toggle TODO * @param {} elementRef TODO * @param {Config} config TODO */ constructor( @Host() @Inject(forwardRef(() => Toggle)) toggle: Toggle, elementRef: ElementRef ) { toggle.toggleEle = elementRef.nativeElement; this.toggle = toggle; } } /** * @name Toggle * @description * A toggle 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 `