Checkbox
The Checkbox is a simple component styled based on the mode. It can be
placed in an ion-item
or used as a stand-alone checkbox.
See the Angular 2 Docs for more info on forms and inputs.
Component
selector: ion-checkbox
Usage
<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>
Input Properties
Attr | Type | Details |
---|---|---|
checked | boolean |
whether or not the checkbox is checked (defaults to false) |
disabled | boolean |
whether or not the checkbox is disabled or not. |
Output Events
Attr | Details |
---|---|
change | expression to evaluate when the checkbox value changes |