diff --git a/ionic/components/option/option.ts b/ionic/components/option/option.ts index 17318ce50a..e14b3a3cf2 100644 --- a/ionic/components/option/option.ts +++ b/ionic/components/option/option.ts @@ -1,5 +1,6 @@ import {Directive, ElementRef, Input} from 'angular2/core'; + /** * @name Option */ @@ -7,17 +8,20 @@ import {Directive, ElementRef, Input} from 'angular2/core'; selector: 'ion-option' }) export class Option { + private _checked: boolean = false; + constructor(private _elementRef: ElementRef) { this._checked = false; } @Input() value: string; - get checked(): boolean { + get checked() { return this._checked; } - @Input() checked; - set checked(val:string) { + + @Input() + set checked(val: any) { this._checked = (val === 'true' || val === true || val === ''); }