diff --git a/ionic/components/checkbox/checkbox.ts b/ionic/components/checkbox/checkbox.ts
index 9bbd050882..bcb2d8dad1 100644
--- a/ionic/components/checkbox/checkbox.ts
+++ b/ionic/components/checkbox/checkbox.ts
@@ -62,8 +62,8 @@ const CHECKBOX_VALUE_ACCESSOR = new Provider(
providers: [CHECKBOX_VALUE_ACCESSOR]
})
export class Checkbox {
- private _checked: any = false;
- private _disabled: any = false;
+ private _checked: boolean = false;
+ private _disabled: boolean = false;
private _labelId: string;
private _fn: Function;
@@ -105,11 +105,11 @@ export class Checkbox {
* @input {boolean} whether or not the checkbox is checked (defaults to false)
*/
@Input()
- get checked() {
+ get checked(): boolean {
return this._checked;
}
- set checked(val) {
+ set checked(val: boolean) {
this._setChecked(isTrueProperty(val));
this.onChange(this._checked);
}
@@ -154,11 +154,11 @@ export class Checkbox {
* @input {boolean} whether or not the checkbox is disabled or not.
*/
@Input()
- get disabled(): any {
+ get disabled(): boolean {
return this._disabled;
}
- set disabled(val: any) {
+ set disabled(val: boolean) {
this._disabled = isTrueProperty(val);
this._item && this._item.setCssClass('item-checkbox-disabled', this._disabled);
}
diff --git a/ionic/components/toggle/test/basic/index.ts b/ionic/components/toggle/test/basic/index.ts
index 14930b585e..171c4ad97f 100644
--- a/ionic/components/toggle/test/basic/index.ts
+++ b/ionic/components/toggle/test/basic/index.ts
@@ -18,8 +18,8 @@ class E2EApp {
fruitsForm: ControlGroup;
grapeDisabled: boolean;
grapeChecked: boolean;
- kiwiModel: boolean;
- strawberryModel: boolean;
+ kiwiValue: boolean;
+ strawberryValue: boolean;
formResults: string;
constructor() {
@@ -32,9 +32,6 @@ class E2EApp {
this.grapeChecked = true;
this.grapeDisabled = true;
-
- this.kiwiModel = true;
- this.strawberryModel = false;
}
toggleGrapeChecked() {
@@ -45,6 +42,16 @@ class E2EApp {
this.grapeDisabled = !this.grapeDisabled;
}
+ kiwiChange(ev) {
+ console.log('kiwiChange', ev);
+ this.kiwiValue = ev.checked;
+ }
+
+ strawberryChange(ev) {
+ console.log('strawberryChange', ev);
+ this.strawberryValue = ev.checked;
+ }
+
doSubmit(ev) {
console.log('Submitting form', this.fruitsForm.value);
this.formResults = JSON.stringify(this.fruitsForm.value);
diff --git a/ionic/components/toggle/test/basic/main.html b/ionic/components/toggle/test/basic/main.html
index 5d537a89a2..731810e576 100644
--- a/ionic/components/toggle/test/basic/main.html
+++ b/ionic/components/toggle/test/basic/main.html
@@ -28,13 +28,13 @@
cherry.value: {{fruitsForm.controls.cherryCtrl.value}}
grape.dirty: {{fruitsForm.controls.grapeCtrl.dirty}}
grape.value: {{fruitsForm.controls.grapeCtrl.value}}
- kiwiModel: {{kiwiModel}}
- strawberryModel: {{strawberryModel}}
+ kiwiValue: {{kiwiValue}}
+ strawberryValue: {{strawberryValue}}