Skip to content

Commit b3a4b71

Browse files
committed
remove one more bfv
1 parent 56971a5 commit b3a4b71

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib/checkbox/checkbox.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import {
1212
ModuleWithProviders,
1313
} from '@angular/core';
1414
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';
15-
import {BooleanFieldValue} from '../core';
15+
import {coerceBooleanProperty} from '../core/coersion/boolean-property';
16+
1617

1718
/**
1819
* Monotonically increasing integer used to auto-generate unique ids for checkbox components.
@@ -93,8 +94,12 @@ export class MdCheckbox implements ControlValueAccessor {
9394
return `input-${this.id}`;
9495
}
9596

97+
private _required: boolean;
98+
9699
/** Whether the checkbox is required or not. */
97-
@Input() @BooleanFieldValue() required: boolean = false;
100+
@Input()
101+
get required(): boolean { return this._required; }
102+
set required(value) { this._required = coerceBooleanProperty(value); }
98103

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

0 commit comments

Comments
 (0)