@@ -13,7 +13,7 @@ import {
13
13
} from '@angular/core' ;
14
14
import { CommonModule } from '@angular/common' ;
15
15
import { NG_VALUE_ACCESSOR , ControlValueAccessor } from '@angular/forms' ;
16
- import { MdRippleModule , coerceBooleanProperty } from '../core' ;
16
+ import { BooleanFieldValue , MdRippleModule } from '../core' ;
17
17
18
18
/**
19
19
* Monotonically increasing integer used to auto-generate unique ids for checkbox components.
@@ -90,24 +90,15 @@ export class MdCheckbox implements ControlValueAccessor {
90
90
@Input ( ) id : string = `md-checkbox-${ ++ nextId } ` ;
91
91
92
92
/** 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 ;
98
94
99
95
/** ID to be applied to the `input` element */
100
96
get inputId ( ) : string {
101
97
return `input-${ this . id } ` ;
102
98
}
103
99
104
100
/** 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 ;
111
102
112
103
/** Whether or not the checkbox should come before or after the label. */
113
104
@Input ( ) align : 'start' | 'end' = 'start' ;
0 commit comments