ionic-framework
Version:
An advanced HTML5 mobile app framework built on Angular2
95 lines (94 loc) • 2.16 kB
TypeScript
import { EventEmitter } from 'angular2/core';
import { Form } from '../../util/form';
import { Item } from '../item/item';
/**
* The checkbox is no different than the HTML checkbox input, except
* it's styled accordingly to the the platform and design mode, such
* as iOS or Material Design.
*
* See the [Angular 2 Docs](https://angular.io/docs/ts/latest/guide/forms.html)
* for more info on forms and inputs.
*
*
* @usage
* ```html
*
* <ion-list>
*
* <ion-item>
* <ion-label>Pepperoni</ion-label>
* <ion-checkbox [(ngModel)]="pepperoni"></ion-checkbox>
* </ion-item>
*
* <ion-item>
* <ion-label>Sausage</ion-label>
* <ion-checkbox [(ngModel)]="sausage" disabled="true"></ion-checkbox>
* </ion-item>
*
* <ion-item>
* <ion-label>Mushrooms</ion-label>
* <ion-checkbox [(ngModel)]="mushrooms"></ion-checkbox>
* </ion-item>
*
* </ion-list>
* ```
* @demo /docs/v2/demos/checkbox/
* @see {@link /docs/v2/components#checkbox Checkbox Component Docs}
*/
export declare class Checkbox {
private _form;
private _item;
private _checked;
private _disabled;
private _labelId;
private _fn;
/**
* @private
*/
id: string;
/**
* @output {Checkbox} expression to evaluate when the checkbox value changes
*/
change: EventEmitter<Checkbox>;
constructor(_form: Form, _item: Item);
/**
* @private
*/
private _click(ev);
/**
* @input {boolean} whether or not the checkbox is checked (defaults to false)
*/
checked: boolean;
/**
* @private
*/
private _setChecked(isChecked);
/**
* @private
*/
writeValue(val: any): void;
/**
* @private
*/
registerOnChange(fn: Function): void;
/**
* @private
*/
registerOnTouched(fn: any): void;
/**
* @input {boolean} whether or not the checkbox is disabled or not.
*/
disabled: boolean;
/**
* @private
*/
onChange(isChecked: boolean): void;
/**
* @private
*/
onTouched(): void;
/**
* @private
*/
ngOnDestroy(): void;
}