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

Method ngAfterViewInit

src/material/sidenav/drawer.ts:502–517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

500 }
501
502 ngAfterViewInit() {
503 this._isAttached = true;
504
505 // Only update the DOM position when the sidenav is positioned at
506 // the end since we project the sidenav before the content by default.
507 if (this._position === 'end') {
508 this._updatePositionInParent('end');
509 }
510
511 // Needs to happen after the position is updated
512 // so the focus trap anchors are in the right place.
513 if (this._platform.isBrowser) {
514 this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
515 this._updateFocusTrapState();
516 }
517 }
518
519 ngOnDestroy() {
520 this._eventCleanups.forEach(cleanup => cleanup());

Callers

nothing calls this directly

Calls 3

_updateFocusTrapStateMethod · 0.95
createMethod · 0.45

Tested by

no test coverage detected