MCPcopy Create free account
hub / github.com/angular/angular / attachView

Method attachView

packages/core/src/application/application_ref.ts:732–737  ·  view source on GitHub ↗

* Attaches a view so that it will be dirty checked. * The view will be automatically detached when it is destroyed. * This will throw if the view is already attached to a ViewContainer.

(viewRef: ViewRef)

Source from the content-addressed store, hash-verified

730 * This will throw if the view is already attached to a ViewContainer.
731 */
732 attachView(viewRef: ViewRef): void {
733 (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);
734 const view = viewRef as InternalViewRef<unknown>;
735 this._views.push(view);
736 view.attachToAppRef(this);
737 }
738
739 /**
740 * Detaches a view from dirty checking again.

Callers 15

_loadComponentMethod · 0.95
expectStableTextsFunction · 0.80
createComponentMethod · 0.80
animation_spec.tsFile · 0.80
insertIntoAppRefMethod · 0.80
defer_spec.tsFile · 0.80
openModalMethod · 0.80
createMethod · 0.80

Calls 3

warnIfDestroyedFunction · 0.85
attachToAppRefMethod · 0.80
pushMethod · 0.45

Tested by 1

renderComponentFunction · 0.64