Skip to content

Commit

Permalink
fixed #342
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtcndkn committed May 13, 2016
1 parent a9d824d commit 88eef79
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions components/inputswitch/inputswitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ export class InputSwitch implements ControlValueAccessor, AfterViewInit {

@Output() onChange: EventEmitter<any> = new EventEmitter();

value: boolean;

checked: boolean = false;

focused: boolean = false;
Expand Down Expand Up @@ -156,11 +154,11 @@ export class InputSwitch implements ControlValueAccessor, AfterViewInit {
this.onModelTouched();
}

writeValue(value: any) : void {
this.value = value;
writeValue(checked: any) : void {
this.checked = checked;

if(this.initialized) {
if(this.value === true)
if(this.checked === true)
this.checkUI();
else
this.uncheckUI();
Expand Down

0 comments on commit 88eef79

Please sign in to comment.