From c32b06de696a0a8c7cac7172e3b643880b141b7d Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Wed, 11 May 2016 09:50:39 -0700 Subject: [PATCH] fix(radio): remove event global so radio works in node Closes #425 --- src/components/radio/radio.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/radio/radio.ts b/src/components/radio/radio.ts index 8310a1919d6..55f4a6207aa 100644 --- a/src/components/radio/radio.ts +++ b/src/components/radio/radio.ts @@ -5,7 +5,6 @@ import { Directive, EventEmitter, HostBinding, - HostListener, Input, OnInit, Optional, @@ -205,7 +204,10 @@ export class MdRadioGroup implements AfterContentInit, ControlValueAccessor { selector: 'md-radio-button', templateUrl: './components/radio/radio.html', styleUrls: ['./components/radio/radio.css'], - encapsulation: ViewEncapsulation.None + encapsulation: ViewEncapsulation.None, + host: { + '(click)': 'onClick($event)' + } }) export class MdRadioButton implements OnInit { @HostBinding('class.md-radio-focused') @@ -333,7 +335,6 @@ export class MdRadioButton implements OnInit { this._disabled = (value != null && value !== false) ? true : null; } - @HostListener('click', ['$event']) onClick(event: Event) { if (this.disabled) { event.preventDefault();