test(animations): properly reference body node for SSR environments (#23300)
PR Close #23300
This commit is contained in:

committed by
Miško Hevery

parent
5b76f04b7f
commit
e8354edcd2
@ -8,7 +8,8 @@
|
||||
|
||||
import {AnimationBuilder} from '@angular/animations';
|
||||
import {AnimationDriver, ɵAnimationEngine as AnimationEngine, ɵAnimationStyleNormalizer as AnimationStyleNormalizer, ɵCssKeyframesDriver as CssKeyframesDriver, ɵNoopAnimationDriver as NoopAnimationDriver, ɵWebAnimationsDriver as WebAnimationsDriver, ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer, ɵsupportsWebAnimations as supportsWebAnimations} from '@angular/animations/browser';
|
||||
import {Injectable, InjectionToken, NgZone, Provider, RendererFactory2} from '@angular/core';
|
||||
import {DOCUMENT} from '@angular/common';
|
||||
import {Inject, Injectable, InjectionToken, NgZone, Provider, RendererFactory2} from '@angular/core';
|
||||
import {ɵDomRendererFactory2 as DomRendererFactory2} from '@angular/platform-browser';
|
||||
|
||||
import {BrowserAnimationBuilder} from './animation_builder';
|
||||
@ -16,8 +17,9 @@ import {AnimationRendererFactory} from './animation_renderer';
|
||||
|
||||
@Injectable()
|
||||
export class InjectableAnimationEngine extends AnimationEngine {
|
||||
constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {
|
||||
super(driver, normalizer);
|
||||
constructor(
|
||||
@Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {
|
||||
super(doc.body, driver, normalizer);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user