import { FocusOrigin } from '@angular/cdk/a11y' ; import { Injectable } from '@angular/core' ; @ Injectable ( { providedIn : 'root' } ) export class FocusIndicatorOriginService { /** Store the most recent origin event */ private _origin : FocusOrigin ; /** Store the event source origin */ setOrigin ( origin ) { this . _origin = origin ; } /** Get the most recent event origin */ getOrigin ( ) { const origin = this . _origin ; this . _origin = null ; return origin ; } }