MCPcopy Create free account
hub / github.com/angular/angular / AppComponent

Class AppComponent

adev/src/content/examples/animations/src/app/app.ts:33–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31})
32// #enddocregion decorator, define
33export class AppComponent {
34 @HostBinding('@.disabled')
35 public animationsDisabled = false;
36 // #enddocregion toggle-app-animations
37
38 // #docregion get-route-animations-data
39 private contexts = inject(ChildrenOutletContexts);
40
41 getRouteAnimationData() {
42 return this.contexts.getContext('primary')?.route?.snapshot?.data?.['animation'];
43 }
44 // #enddocregion get-route-animations-data
45
46 toggleAnimations() {
47 this.animationsDisabled = !this.animationsDisabled;
48 }
49 // #docregion toggle-app-animations
50}
51// #enddocregion toggle-app-animations

Callers

nothing calls this directly

Calls 2

HostBindingInterface · 0.90
injectFunction · 0.90

Tested by

no test coverage detected