MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

src/cdk/bidi/directionality.ts:48–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 readonly change = new EventEmitter<Direction>();
47
48 constructor() {
49 const _document = inject(DIR_DOCUMENT, {optional: true});
50
51 if (_document) {
52 const bodyDir = _document.body ? _document.body.dir : null;
53 const htmlDir = _document.documentElement ? _document.documentElement.dir : null;
54 this.valueSignal.set(_resolveDirectionality(bodyDir || htmlDir || 'ltr'));
55 }
56 }
57
58 ngOnDestroy() {
59 this.change.complete();

Callers

nothing calls this directly

Implementers 3

DevAppDirectionalitysrc/dev-app/dev-app/dev-app-directiona
Dirsrc/cdk/bidi/dir.ts
FakeDirectionalitysrc/cdk/testing/private/fake-direction

Calls 2

_resolveDirectionalityFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected