@@ -12,17 +12,17 @@ import {
1212 Directive ,
1313 ElementRef ,
1414 forwardRef ,
15- Input ,
1615 OnDestroy ,
1716 Optional ,
1817 Renderer2 ,
1918 Self ,
2019 ViewEncapsulation ,
2120 Inject ,
2221} from '@angular/core' ;
23- import { coerceBooleanProperty , FocusOriginMonitor , Platform } from '../core' ;
22+ import { FocusOriginMonitor , Platform } from '../core' ;
2423import { mixinDisabled , CanDisable } from '../core/common-behaviors/disabled' ;
2524import { CanColor , mixinColor } from '../core/common-behaviors/color' ;
25+ import { CanDisableRipple , mixinDisableRipple } from '../core/common-behaviors/disable-ripple' ;
2626
2727
2828// TODO(kara): Convert attribute selectors to classes when attr maps become available
@@ -103,7 +103,7 @@ export class MdMiniFab {
103103export class MdButtonBase {
104104 constructor ( public _renderer : Renderer2 , public _elementRef : ElementRef ) { }
105105}
106- export const _MdButtonMixinBase = mixinColor ( mixinDisabled ( MdButtonBase ) ) ;
106+ export const _MdButtonMixinBase = mixinColor ( mixinDisabled ( mixinDisableRipple ( MdButtonBase ) ) ) ;
107107
108108
109109/**
@@ -120,25 +120,19 @@ export const _MdButtonMixinBase = mixinColor(mixinDisabled(MdButtonBase));
120120 } ,
121121 templateUrl : 'button.html' ,
122122 styleUrls : [ 'button.css' ] ,
123- inputs : [ 'disabled' , 'color' ] ,
123+ inputs : [ 'disabled' , 'disableRipple' , ' color'] ,
124124 encapsulation : ViewEncapsulation . None ,
125125 changeDetection : ChangeDetectionStrategy . OnPush ,
126126} )
127- export class MdButton extends _MdButtonMixinBase implements OnDestroy , CanDisable , CanColor {
127+ export class MdButton extends _MdButtonMixinBase
128+ implements OnDestroy , CanDisable , CanColor , CanDisableRipple {
129+
128130 /** Whether the button is round. */
129131 _isRoundButton : boolean = this . _hasAttributeWithPrefix ( 'fab' , 'mini-fab' ) ;
130132
131133 /** Whether the button is icon button. */
132134 _isIconButton : boolean = this . _hasAttributeWithPrefix ( 'icon-button' ) ;
133135
134- /** Whether the ripple effect on click should be disabled. */
135- private _disableRipple : boolean = false ;
136-
137- /** Whether the ripple effect for this button is disabled. */
138- @Input ( )
139- get disableRipple ( ) { return this . _disableRipple ; }
140- set disableRipple ( v ) { this . _disableRipple = coerceBooleanProperty ( v ) ; }
141-
142136 constructor ( renderer : Renderer2 ,
143137 elementRef : ElementRef ,
144138 private _platform : Platform ,
@@ -197,7 +191,7 @@ export class MdButton extends _MdButtonMixinBase implements OnDestroy, CanDisabl
197191 '[attr.aria-disabled]' : 'disabled.toString()' ,
198192 '(click)' : '_haltDisabledEvents($event)' ,
199193 } ,
200- inputs : [ 'disabled' , 'color' ] ,
194+ inputs : [ 'disabled' , 'disableRipple' , ' color'] ,
201195 templateUrl : 'button.html' ,
202196 styleUrls : [ 'button.css' ] ,
203197 encapsulation : ViewEncapsulation . None ,
0 commit comments