MCPcopy Index your code
hub / github.com/angular/angular / attach

Method attach

packages/router/src/directives/router_outlet.ts:363–369  ·  view source on GitHub ↗

* Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree

(ref: ComponentRef<any>, activatedRoute: ActivatedRoute)

Source from the content-addressed store, hash-verified

361 * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
362 */
363 attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute): void {
364 this.activated = ref;
365 this._activatedRoute = activatedRoute;
366 this.location.insert(ref.hostView);
367 this.inputBinder?.bindActivatedRouteToOutletComponent(this);
368 this.attachEvents.emit(ref.instance);
369 }
370
371 deactivate(): void {
372 if (this.activated) {

Callers 1

Calls 3

emitMethod · 0.65
insertMethod · 0.45

Tested by

no test coverage detected