MCPcopy Index your code
hub / github.com/angular/angular / AnimationHost

Class AnimationHost

adev/src/app/features/home/animation/animation.spec.ts:20–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18const TEST_TIMESTEP = 500;
19
20@Component({
21 selector: 'adev-animation-host',
22 imports: [AnimationLayerDirective],
23 providers: [AnimationCreatorService],
24 template: `
25 <div adevAnimationLayer layerId="layer-1">
26 <div class="circle"></div>
27 </div>
28 <div adevAnimationLayer layerId="layer-2">
29 <div class="square"></div>
30 </div>
31 <div adevAnimationLayer layerId="layer-3">
32 <div class="triangle"></div>
33 <div class="triangle"></div>
34 </div>
35 `,
36})
37class AnimationHost implements AfterViewInit {
38 private animationCreator = inject(AnimationCreatorService);
39 layers = viewChildren(AnimationLayerDirective);
40 animation!: Animation;
41
42 ngAfterViewInit() {
43 this.animation = this.animationCreator.createAnimation(this.layers(), {
44 timestep: TEST_TIMESTEP,
45 });
46 }
47}
48
49// Animation definition
50const DEFINITION: AnimationDefinition = [

Callers

nothing calls this directly

Calls 3

ComponentInterface · 0.90
injectFunction · 0.90
viewChildrenFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…