33 Component ,
44 ContentChildren ,
55 Directive ,
6+ ElementRef ,
67 EventEmitter ,
78 HostBinding ,
89 Input ,
@@ -15,11 +16,13 @@ import {
1516 NgModule ,
1617 ModuleWithProviders ,
1718} from '@angular/core' ;
19+ import { CommonModule } from '@angular/common' ;
1820import {
1921 NG_VALUE_ACCESSOR ,
2022 ControlValueAccessor
2123} from '@angular/forms' ;
22- import { MdUniqueSelectionDispatcher } from '../core' ;
24+ import { MdRippleModule , MdUniqueSelectionDispatcher } from '../core' ;
25+ import { coerceBooleanProperty } from '../core/coersion/boolean-property' ;
2326
2427
2528
@@ -263,14 +266,22 @@ export class MdRadioButton implements OnInit {
263266 /** Value assigned to this radio.*/
264267 private _value : any = null ;
265268
269+ /** Whether the ripple effect on click should be disabled. */
270+ private _disableRipple : boolean ;
271+
266272 /** The parent radio group. May or may not be present. */
267273 radioGroup : MdRadioGroup ;
268274
275+ @Input ( )
276+ get disableRipple ( ) : boolean { return this . _disableRipple ; }
277+ set disableRipple ( value ) { this . _disableRipple = coerceBooleanProperty ( value ) ; }
278+
269279 /** Event emitted when the group value changes. */
270280 @Output ( )
271281 change : EventEmitter < MdRadioChange > = new EventEmitter < MdRadioChange > ( ) ;
272282
273283 constructor ( @Optional ( ) radioGroup : MdRadioGroup ,
284+ private _elementRef : ElementRef ,
274285 public radioDispatcher : MdUniqueSelectionDispatcher ) {
275286 // Assertions. Ideally these should be stripped out by the compiler.
276287 // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.
@@ -411,10 +422,15 @@ export class MdRadioButton implements OnInit {
411422 this . radioGroup . _touch ( ) ;
412423 }
413424 }
425+
426+ getHostElement ( ) {
427+ return this . _elementRef . nativeElement ;
428+ }
414429}
415430
416431
417432@NgModule ( {
433+ imports : [ CommonModule , MdRippleModule ] ,
418434 exports : [ MdRadioGroup , MdRadioButton ] ,
419435 declarations : [ MdRadioGroup , MdRadioButton ] ,
420436} )
0 commit comments