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

Method routerLink

packages/router/src/directives/router_link.ts:484–498  ·  view source on GitHub ↗
(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined)

Source from the content-addressed store, hash-verified

482 */
483 @Input()
484 set routerLink(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined) {
485 if (commandsOrUrlTree == null) {
486 this.routerLinkInput.set(null);
487 this.setTabIndexIfNotOnNativeEl(null);
488 } else {
489 if (isUrlTree(commandsOrUrlTree)) {
490 this.routerLinkInput.set(commandsOrUrlTree);
491 } else {
492 this.routerLinkInput.set(
493 Array.isArray(commandsOrUrlTree) ? commandsOrUrlTree : [commandsOrUrlTree],
494 );
495 }
496 this.setTabIndexIfNotOnNativeEl('0');
497 }
498 }
499
500 /** @docs-private */
501 @HostListener('click', [

Callers

nothing calls this directly

Calls 4

isUrlTreeFunction · 0.90
isArrayMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected