• Overview
@angular/router

RouterLinkWithHref

directive

When applied to an element in a template, makes that element a link that initiates navigation to a route. Navigation opens one or more routed components in one or more <router-outlet> locations on the page.

  
    class RouterLinkWithHref implements OnChanges ,OnDestroy {}
  
  

href

string | null

Represents an href attribute value applied to a host element, when a host element is <a>. For other tags, the value is null.

target

string | undefined

Represents the target attribute on a host element. This is only used when the host element is an <a> tag.

queryParams

Params | null | undefined

Passed to Router#createUrlTree as part of the UrlCreationOptions.

fragment

string | undefined

Passed to Router#createUrlTree as part of the UrlCreationOptions.

queryParamsHandling

QueryParamsHandling | null | undefined

Passed to Router#createUrlTree as part of the UrlCreationOptions.

state

{ [k: string]: any; } | undefined

info

unknown

relativeTo

ActivatedRoute | null | undefined

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.

preserveFragment

boolean

Passed to Router#createUrlTree as part of the UrlCreationOptions.

skipLocationChange

boolean

replaceUrl

boolean

ngOnChanges

void
@paramchangesSimpleChanges | undefined
@returnsvoid

onClick

boolean
@parambuttonnumber
@paramctrlKeyboolean
@paramshiftKeyboolean
@paramaltKeyboolean
@parammetaKeyboolean
@returnsboolean

ngOnDestroy

any
@returnsany

urlTree

UrlTree | null
Jump to details