import { Injectable } from '@angular/core' ; @ Injectable ( { providedIn : 'root' , } ) export class AnimationsService { private static routeAnimationType : RouteAnimationType = 'NONE' ; static isRouteAnimationsType ( type ) { return AnimationsService . routeAnimationType === type ; } constructor ( ) { AnimationsService . routeAnimationType = 'NONE' ; } updateRouteAnimationType ( pageAnimations , elementsAnimations ) { AnimationsService . routeAnimationType = pageAnimations && elementsAnimations ? 'ALL' : pageAnimations ? 'PAGE' : elementsAnimations ? 'ELEMENTS' : 'NONE' ; } } export type RouteAnimationType = 'ALL' | 'PAGE' | 'ELEMENTS' | 'NONE' ;