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

Method attach

packages/router/src/directives/router_outlet.ts:366–372  ·  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

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

Callers 1

Calls 3

emitMethod · 0.65
insertMethod · 0.45

Tested by

no test coverage detected