| 31 | }) |
| 32 | // #enddocregion decorator, define |
| 33 | export 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 |
nothing calls this directly
no test coverage detected