MCPcopy
hub / github.com/angular/components / _watchDrawerMode

Method _watchDrawerMode

src/material/sidenav/drawer.ts:990–997  ·  view source on GitHub ↗

Subscribes to changes in drawer mode so we can run change detection.

(drawer: MatDrawer)

Source from the content-addressed store, hash-verified

988
989 /** Subscribes to changes in drawer mode so we can run change detection. */
990 private _watchDrawerMode(drawer: MatDrawer): void {
991 drawer._modeChanged
992 .pipe(takeUntil(merge(this._drawers.changes, this._destroyed)))
993 .subscribe(() => {
994 this.updateContentMargins();
995 this._changeDetectorRef.markForCheck();
996 });
997 }
998
999 /** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */
1000 private _setContainerClass(isAdd: boolean): void {

Callers 1

ngAfterContentInitMethod · 0.95

Calls 2

updateContentMarginsMethod · 0.95
markForCheckMethod · 0.80

Tested by

no test coverage detected