@@ -146,9 +146,7 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
146146
147147 set labelPosition ( v ) {
148148 this . _labelPosition = ( v == 'before' ) ? 'before' : 'after' ;
149- if ( this . _radios ) {
150- this . _radios . forEach ( radio => radio . _groupValueChanged ( ) ) ;
151- }
149+ this . _markRadiosForCheck ( ) ;
152150 }
153151
154152 /** Value of the radio button. */
@@ -186,7 +184,7 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
186184 this . _disabled = value ;
187185 if ( this . _radios ) {
188186 // Update radios disabled state
189- this . _radios . forEach ( ( r ) => r . _groupValueChanged ( ) ) ;
187+ this . _radios . forEach ( ( r ) => r . _markForCheck ( ) ) ;
190188 }
191189 }
192190
@@ -249,6 +247,12 @@ export class MdRadioGroup extends _MdRadioGroupMixinBase
249247 }
250248 }
251249
250+ _markRadiosForCheck ( ) {
251+ if ( this . _radios ) {
252+ this . _radios . forEach ( radio => radio . _markForCheck ( ) ) ;
253+ }
254+ }
255+
252256 /**
253257 * Sets the model value. Implemented as part of ControlValueAccessor.
254258 * @param value
@@ -403,8 +407,6 @@ export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
403407 }
404408 set disabled ( value : boolean ) {
405409 this . _disabled = coerceBooleanProperty ( value ) ;
406- // Update rippleDisabled
407- this . _changeDetector . markForCheck ( ) ;
408410 }
409411
410412 /**
@@ -466,7 +468,12 @@ export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
466468 this . _focusOriginMonitor . focusVia ( this . _inputElement . nativeElement , this . _renderer , 'keyboard' ) ;
467469 }
468470
469- _groupValueChanged ( ) {
471+ /**
472+ * Marks the radio button as needing checking for change detection.
473+ * This method is exposed because the parent radio group will directly
474+ * update bound properties of the radio button.
475+ */
476+ _markForCheck ( ) {
470477 // When group value changes, the button will not be notified. Use `markForCheck` to explicit
471478 // update radio button's status
472479 this . _changeDetector . markForCheck ( ) ;
0 commit comments