Skip to content

Commit

Permalink
fix(radio): remove event global so radio works in node
Browse files Browse the repository at this point in the history
Closes #425
  • Loading branch information
kara committed May 11, 2016
1 parent 3d972d1 commit c32b06d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
Directive,
EventEmitter,
HostBinding,
HostListener,
Input,
OnInit,
Optional,
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit c32b06d

Please sign in to comment.