mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(): add types to Option
This commit is contained in:
@ -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 === '');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user