@@ -290,7 +290,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
290
290
'[class.mat-radio-checked]' : 'checked' ,
291
291
'[class.mat-radio-disabled]' : 'disabled' ,
292
292
'[attr.id]' : 'id' ,
293
- }
293
+ } ,
294
294
changeDetection : ChangeDetectionStrategy . OnPush ,
295
295
} )
296
296
export class MdRadioButton implements OnInit , AfterViewInit , OnDestroy {
@@ -327,13 +327,14 @@ export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
327
327
private _elementRef : ElementRef ,
328
328
private _renderer : Renderer ,
329
329
private _changeDetector : ChangeDetectorRef ,
330
- public radioDispatcher : UniqueSelectionDispatcher ) {
330
+ private _focusOriginMonitor : FocusOriginMonitor ,
331
+ private _radioDispatcher : UniqueSelectionDispatcher ) {
331
332
// Assertions. Ideally these should be stripped out by the compiler.
332
333
// TODO(jelbourn): Assert that there's no name binding AND a parent radio group.
333
334
334
335
this . radioGroup = radioGroup ;
335
336
336
- radioDispatcher . listen ( ( id : string , name : string ) => {
337
+ _radioDispatcher . listen ( ( id : string , name : string ) => {
337
338
if ( id != this . id && name == this . name ) {
338
339
this . checked = false ;
339
340
}
@@ -430,22 +431,9 @@ export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
430
431
this . _disabled = ( value != null && value !== false ) ? true : null ;
431
432
}
432
433
433
- /**
434
- * Event emitted when the checked state of this radio button changes.
435
- * Change events are only emitted when the value changes due to user interaction with
436
- * the radio button (the same behavior as `<input type-"radio">`).
437
- */
438
- @Output ( )
439
- change : EventEmitter < MdRadioChange > = new EventEmitter < MdRadioChange > ( ) ;
440
-
441
434
/** The parent radio group. May or may not be present. */
442
435
radioGroup : MdRadioGroup ;
443
436
444
- /** ID of the native input element inside `<md-radio-button>` */
445
- get inputId ( ) : string {
446
- return `${ this . id } -input` ;
447
- }
448
-
449
437
/** Whether this radio is checked. */
450
438
private _checked : boolean = false ;
451
439
@@ -467,26 +455,6 @@ export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
467
455
/** Reference to the current focus ripple. */
468
456
private _focusedRippleRef : RippleRef ;
469
457
470
- /** The native `<input type=radio>` element */
471
- @ViewChild ( 'input' ) _inputElement : ElementRef ;
472
-
473
- constructor ( @Optional ( ) radioGroup : MdRadioGroup ,
474
- private _elementRef : ElementRef ,
475
- private _renderer : Renderer ,
476
- private _focusOriginMonitor : FocusOriginMonitor ,
477
- private _radioDispatcher : UniqueSelectionDispatcher ) {
478
- // Assertions. Ideally these should be stripped out by the compiler.
479
- // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.
480
-
481
- this . radioGroup = radioGroup ;
482
-
483
- _radioDispatcher . listen ( ( id : string , name : string ) => {
484
- if ( id != this . id && name == this . name ) {
485
- this . checked = false ;
486
- }
487
- } ) ;
488
- }
489
-
490
458
/** Focuses the radio button. */
491
459
focus ( ) : void {
492
460
this . _focusOriginMonitor . focusVia ( this . _inputElement . nativeElement , this . _renderer , 'keyboard' ) ;
0 commit comments