Skip to content

Commit c32b06d

Browse files
committed
fix(radio): remove event global so radio works in node
Closes #425
1 parent 3d972d1 commit c32b06d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/radio/radio.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
Directive,
66
EventEmitter,
77
HostBinding,
8-
HostListener,
98
Input,
109
OnInit,
1110
Optional,
@@ -205,7 +204,10 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor {
205204
selector: 'md-radio-button',
206205
templateUrl: './components/radio/radio.html',
207206
styleUrls: ['./components/radio/radio.css'],
208-
encapsulation: ViewEncapsulation.None
207+
encapsulation: ViewEncapsulation.None,
208+
host: {
209+
'(click)': 'onClick($event)'
210+
}
209211
})
210212
export class MdRadioButton implements OnInit {
211213
@HostBinding('class.md-radio-focused')
@@ -333,7 +335,6 @@ export class MdRadioButton implements OnInit {
333335
this._disabled = (value != null && value !== false) ? true : null;
334336
}
335337

336-
@HostListener('click', ['$event'])
337338
onClick(event: Event) {
338339
if (this.disabled) {
339340
event.preventDefault();

0 commit comments

Comments
 (0)