W3cubDocs

/Angular 12

RouterLinkWithHref

directive

Lets you link to specific routes in your app.

See more...

Exported from

Selectors

Properties

Property Description
@Input()target: string
@Input()queryParams?: Params | null

Passed to Router#createUrlTree as part of the UrlCreationOptions.

See also:

@Input()fragment?: string

Passed to Router#createUrlTree as part of the UrlCreationOptions.

See also:

@Input()queryParamsHandling?: QueryParamsHandling | null

Passed to Router#createUrlTree as part of the UrlCreationOptions.

See also:

@Input()preserveFragment: boolean

Passed to Router#createUrlTree as part of the UrlCreationOptions.

See also:

@Input()skipLocationChange: boolean

Passed to Router#navigateByUrl as part of the NavigationBehaviorOptions.

See also:

@Input()replaceUrl: boolean

Passed to Router#navigateByUrl as part of the NavigationBehaviorOptions.

See also:

@Input()state?: { [k: string]: any; }

Passed to Router#navigateByUrl as part of the NavigationBehaviorOptions.

See also:

@Input()relativeTo?: ActivatedRoute | null

Passed to Router#createUrlTree as part of the UrlCreationOptions. Specify a value here when you do not want to use the default value for routerLink, which is the current activated route. Note that a value of undefined here will use the routerLink default.

See also:

href: string
@Input()routerLink: string | any[] Write-Only

Commands to pass to Router#createUrlTree.

  • array: commands to pass to Router#createUrlTree.
  • string: shorthand for array of commands with just the string, i.e. ['/route']
  • null|undefined: shorthand for an empty array of commands, i.e. []

See also:

urlTree: UrlTree Read-Only

Description

See RouterLink for more information.

© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/router/RouterLinkWithHref