File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ import {
12
12
ModuleWithProviders ,
13
13
} from '@angular/core' ;
14
14
import { NG_VALUE_ACCESSOR , ControlValueAccessor } from '@angular/forms' ;
15
- import { BooleanFieldValue } from '../core' ;
15
+ import { coerceBooleanProperty } from '../core/coersion/boolean-property' ;
16
+
16
17
17
18
/**
18
19
* Monotonically increasing integer used to auto-generate unique ids for checkbox components.
@@ -93,8 +94,12 @@ export class MdCheckbox implements ControlValueAccessor {
93
94
return `input-${ this . id } ` ;
94
95
}
95
96
97
+ private _required : boolean ;
98
+
96
99
/** 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 ) ; }
98
103
99
104
/** Whether or not the checkbox should come before or after the label. */
100
105
@Input ( ) align : 'start' | 'end' = 'start' ;
You can’t perform that action at this time.
0 commit comments