@@ -34,6 +34,7 @@ import {
34
34
Output ,
35
35
ViewChild ,
36
36
ViewEncapsulation ,
37
+ Inject ,
37
38
} from '@angular/core' ;
38
39
import { ControlValueAccessor , NG_VALUE_ACCESSOR } from '@angular/forms' ;
39
40
import {
@@ -46,6 +47,7 @@ import {
46
47
mixinTabIndex ,
47
48
} from '@angular/material/core' ;
48
49
import { Subscription } from 'rxjs' ;
50
+ import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations' ;
49
51
50
52
/**
51
53
* Visually, a 30px separation between tick marks looks best. This is very subjective but it is
@@ -126,6 +128,7 @@ export const _MatSliderMixinBase =
126
128
'[class.mat-slider-vertical]' : 'vertical' ,
127
129
'[class.mat-slider-min-value]' : '_isMinValue' ,
128
130
'[class.mat-slider-hide-last-tick]' : 'disabled || _isMinValue && _thumbGap && _invertAxis' ,
131
+ '[class._mat-animation-noopable]' : '_animationMode === "NoopAnimations"' ,
129
132
} ,
130
133
templateUrl : 'slider.html' ,
131
134
styleUrls : [ 'slider.css' ] ,
@@ -431,7 +434,9 @@ export class MatSlider extends _MatSliderMixinBase
431
434
private _focusMonitor : FocusMonitor ,
432
435
private _changeDetectorRef : ChangeDetectorRef ,
433
436
@Optional ( ) private _dir : Directionality ,
434
- @Attribute ( 'tabindex' ) tabIndex : string ) {
437
+ @Attribute ( 'tabindex' ) tabIndex : string ,
438
+ // @deletion -target 7.0.0 `_animationMode` parameter to be made required.
439
+ @Optional ( ) @Inject ( ANIMATION_MODULE_TYPE ) public _animationMode ?: string ) {
435
440
super ( elementRef ) ;
436
441
437
442
this . tabIndex = parseInt ( tabIndex ) || 0 ;
0 commit comments