Skip to content

Commit 01a8190

Browse files
committed
.
1 parent 0386bdd commit 01a8190

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/lib/checkbox/checkbox.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '@angular/core';
1414
import {CommonModule} from '@angular/common';
1515
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';
16-
import {MdRippleModule, coerceBooleanProperty} from '../core';
16+
import {BooleanFieldValue, MdRippleModule} from '../core';
1717

1818
/**
1919
* Monotonically increasing integer used to auto-generate unique ids for checkbox components.
@@ -90,24 +90,15 @@ export class MdCheckbox implements ControlValueAccessor {
9090
@Input() id: string = `md-checkbox-${++nextId}`;
9191

9292
/** Whether the ripple effect on click should be disabled. */
93-
private _disableRipple: boolean = false;
94-
95-
@Input()
96-
get disableRipple() { return this._disableRipple; }
97-
set disableRipple(v) { this._disableRipple = coerceBooleanProperty(v); }
93+
@Input() @BooleanFieldValue() disableRipple: boolean = false;
9894

9995
/** ID to be applied to the `input` element */
10096
get inputId(): string {
10197
return `input-${this.id}`;
10298
}
10399

104100
/** Whether the checkbox is required or not. */
105-
private _required: boolean;
106-
107-
/** Whether the checkbox is required or not. */
108-
@Input()
109-
get required(): boolean { return this._required; }
110-
set required(value) { this._required = coerceBooleanProperty(value); }
101+
@Input() @BooleanFieldValue() required: boolean = false;
111102

112103
/** Whether or not the checkbox should come before or after the label. */
113104
@Input() align: 'start' | 'end' = 'start';

0 commit comments

Comments
 (0)