mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
docs(checkbox): checkbox attribute docs
This commit is contained in:
@ -4,10 +4,13 @@ import {Ion} from '../ion';
|
||||
import {Form} from '../../util/form';
|
||||
|
||||
/**
|
||||
* The checkbox is no different than the HTML checkbox input, except it's styled differently
|
||||
* The checkbox is no different than the HTML checkbox input, except it's styled differently.
|
||||
*
|
||||
* See the [Angular 2 Docs](https://angular.io/docs/js/latest/api/core/Form-interface.html) for more info on forms and input.
|
||||
*
|
||||
* @property [checked] - whether or not the checkbox is checked (defaults to false)
|
||||
* @property [value] - the value of the checkbox component
|
||||
*
|
||||
* @usage
|
||||
* ```html
|
||||
* <ion-checkbox checked="true" value="isChecked" ng-control="htmlCtrl">
|
||||
@ -66,8 +69,7 @@ export class Checkbox {
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the checked state of the checkbox. Calls onChange to pass the
|
||||
* updated checked state to the model (Control).
|
||||
* Toggle the checked state of the checkbox. Calls onChange to pass the updated checked state to the model (Control).
|
||||
*/
|
||||
toggle() {
|
||||
this.checked = !this.checked;
|
||||
|
Reference in New Issue
Block a user