import { Direction, Directionality } from '@angular/cdk/bidi'; import { EventEmitter, OnDestroy, Service, signal } from '@angular/core'; @Service() export class AppDirectionality implements Directionality, OnDestroy { readonly change = new EventEmitter(); get value(): Direction { return this.valueSignal(); } set value(value: Direction) { this.valueSignal.set(value); this.change.next(value); } valueSignal = signal('ltr'); ngOnDestroy() { this.change.complete(); } }