@@ -28,6 +28,7 @@ import {
28
28
QueryList ,
29
29
ViewChild ,
30
30
ViewEncapsulation ,
31
+ Inject ,
31
32
} from '@angular/core' ;
32
33
import { ControlValueAccessor , NG_VALUE_ACCESSOR } from '@angular/forms' ;
33
34
import {
@@ -42,6 +43,8 @@ import {
42
43
mixinTabIndex ,
43
44
RippleRef ,
44
45
} from '@angular/material/core' ;
46
+ import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations' ;
47
+
45
48
46
49
// Increasing integer for generating unique ids for radio components.
47
50
let nextUniqueId = 0 ;
@@ -324,6 +327,7 @@ export const _MatRadioButtonMixinBase =
324
327
'class' : 'mat-radio-button' ,
325
328
'[class.mat-radio-checked]' : 'checked' ,
326
329
'[class.mat-radio-disabled]' : 'disabled' ,
330
+ '[class._mat-animation-noopable]' : '_animationMode === "NoopAnimations"' ,
327
331
'[attr.id]' : 'id' ,
328
332
// Note: under normal conditions focus shouldn't land on this element, however it may be
329
333
// programmatically set, for example inside of a focus trap, in this case we want to forward
@@ -467,7 +471,8 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
467
471
elementRef : ElementRef ,
468
472
private _changeDetector : ChangeDetectorRef ,
469
473
private _focusMonitor : FocusMonitor ,
470
- private _radioDispatcher : UniqueSelectionDispatcher ) {
474
+ private _radioDispatcher : UniqueSelectionDispatcher ,
475
+ @Optional ( ) @Inject ( ANIMATION_MODULE_TYPE ) public _animationMode ?: string ) {
471
476
super ( elementRef ) ;
472
477
473
478
// Assertions. Ideally these should be stripped out by the compiler.
0 commit comments