File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export class MdButton {
82
82
83
83
_setElementColor ( color : string , isAdd : boolean ) {
84
84
if ( color != null && color != '' ) {
85
- this . _renderer . setElementClass ( this . _elementRef . nativeElement , `md-${ color } ` , isAdd ) ;
85
+ this . _renderer . setElementClass ( this . _getHostElement ( ) , `md-${ color } ` , isAdd ) ;
86
86
}
87
87
}
88
88
@@ -96,15 +96,15 @@ export class MdButton {
96
96
97
97
/** Focuses the button. */
98
98
focus ( ) : void {
99
- this . _renderer . invokeElementMethod ( this . _elementRef . nativeElement , 'focus' ) ;
99
+ this . _renderer . invokeElementMethod ( this . _getHostElement ( ) , 'focus' ) ;
100
100
}
101
101
102
102
_getHostElement ( ) {
103
103
return this . _elementRef . nativeElement ;
104
104
}
105
105
106
106
_isRoundButton ( ) {
107
- const el = this . _elementRef . nativeElement ;
107
+ const el = this . _getHostElement ( ) ;
108
108
return el . hasAttribute ( 'md-icon-button' ) ||
109
109
el . hasAttribute ( 'md-fab' ) ||
110
110
el . hasAttribute ( 'md-mini-fab' ) ;
You can’t perform that action at this time.
0 commit comments