chore(): add types to Option

This commit is contained in:
Adam Bradley
2016-01-14 13:28:36 -06:00
parent b74f3b802f
commit f23651e126

View File

@ -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 === '');
}