Skip to content

Commit 7f4c885

Browse files
committed
fix test
1 parent 5a5c2ba commit 7f4c885

File tree

1 file changed

+2
-34
lines changed

1 file changed

+2
-34
lines changed

src/lib/radio/radio.ts

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
290290
'[class.mat-radio-checked]': 'checked',
291291
'[class.mat-radio-disabled]': 'disabled',
292292
'[attr.id]': 'id',
293-
}
293+
},
294294
changeDetection: ChangeDetectionStrategy.OnPush,
295295
})
296296
export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
@@ -312,39 +312,6 @@ export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
312312
get disableRipple(): boolean { return this._disableRipple; }
313313
set disableRipple(value) { this._disableRipple = coerceBooleanProperty(value); }
314314

315-
/**
316-
* Event emitted when the checked state of this radio button changes.
317-
* Change events are only emitted when the value changes due to user interaction with
318-
* the radio button (the same behavior as `<input type-"radio">`).
319-
*/
320-
@Output()
321-
change: EventEmitter<MdRadioChange> = new EventEmitter<MdRadioChange>();
322-
323-
/** The native `<input type=radio>` element */
324-
@ViewChild('input') _inputElement: ElementRef;
325-
326-
constructor(@Optional() radioGroup: MdRadioGroup,
327-
private _elementRef: ElementRef,
328-
private _renderer: Renderer,
329-
private _changeDetector: ChangeDetectorRef,
330-
public radioDispatcher: UniqueSelectionDispatcher) {
331-
// Assertions. Ideally these should be stripped out by the compiler.
332-
// TODO(jelbourn): Assert that there's no name binding AND a parent radio group.
333-
334-
this.radioGroup = radioGroup;
335-
336-
radioDispatcher.listen((id: string, name: string) => {
337-
if (id != this.id && name == this.name) {
338-
this.checked = false;
339-
}
340-
});
341-
}
342-
343-
/** ID of the native input element inside `<md-radio-button>` */
344-
get inputId(): string {
345-
return `${this.id}-input`;
346-
}
347-
348315
/** Whether this radio button is checked. */
349316
@Input()
350317
get checked(): boolean {
@@ -473,6 +440,7 @@ export class MdRadioButton implements OnInit, AfterViewInit, OnDestroy {
473440
constructor(@Optional() radioGroup: MdRadioGroup,
474441
private _elementRef: ElementRef,
475442
private _renderer: Renderer,
443+
private _changeDetector: ChangeDetectorRef,
476444
private _focusOriginMonitor: FocusOriginMonitor,
477445
private _radioDispatcher: UniqueSelectionDispatcher) {
478446
// Assertions. Ideally these should be stripped out by the compiler.

0 commit comments

Comments
 (0)