Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NSRouterLink

The nsRouterLink directive lets you link to specific parts of your app.

Consider the following route configuration:

[{ path: "/user", component: UserCmp }]

When linking to this User route, you can write:

<a [nsRouterLink]="["/user"]">link to user component</a>

NSRouterLink expects the value to be an array of path segments, followed by the params for that level of routing. For instance ["/team", {teamId: 1}, "user", {userId: 2}] means that we want to generate a link to /team;teamId=1/user;userId=2.

The first segment name can be prepended with /, ./, or ../. If the segment begins with /, the router will look up the route from the root of the app. If the segment begins with ./, or doesn"t begin with a slash, the router will instead look in the current component"s children for the route. And if the segment begins with ../, the router will go up one level.

Hierarchy

  • NSRouterLink

Index

Constructors

constructor

Properties

clearHistory

clearHistory: boolean

Private commands

commands: any[]

Private el

el: ElementRef

fragment

fragment: string

Private navigator

navigator: RouterExtensions

Private ngZone

ngZone: NgZone

pageTransition

pageTransition: boolean | string | NavigationTransition

pageTransitionDuration

pageTransitionDuration: any

preserveFragment

preserveFragment: boolean

preserveQueryParams

preserveQueryParams: boolean

queryParams

queryParams: object

Type declaration

  • [k: string]: any

queryParamsHandling

queryParamsHandling: QueryParamsHandling

replaceUrl

replaceUrl: boolean

Private route

route: ActivatedRoute

Private router

router: Router

skipLocationChange

skipLocationChange: boolean

target

target: string

Accessors

params

  • set (data: any[] | string): void

urlTree

  • get (): UrlTree

Methods

Private convertClearHistory

  • convertClearHistory(value: boolean | string): boolean

Private getExtras

Private getTransition

  • getTransition(): object

ngAfterViewInit

  • ngAfterViewInit(): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method