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

Method routerLink

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

Source from the content-addressed store, hash-verified

453 */
454 @Input()
455 set routerLink(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined) {
456 if (commandsOrUrlTree == null) {
457 this.routerLinkInput.set(null);
458 this.setTabIndexIfNotOnNativeEl(null);
459 } else {
460 if (isUrlTree(commandsOrUrlTree)) {
461 this.routerLinkInput.set(commandsOrUrlTree);
462 } else {
463 this.routerLinkInput.set(
464 Array.isArray(commandsOrUrlTree) ? commandsOrUrlTree : [commandsOrUrlTree],
465 );
466 }
467 this.setTabIndexIfNotOnNativeEl('0');
468 }
469 }
470
471 /** @docs-private */
472 @HostListener('click', [

Callers

nothing calls this directly

Calls 4

isUrlTreeFunction · 0.90
isArrayMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected