API / ember-link / Link
Class: Link
Extended by
Constructors
new Link(linkManager, params)
new Link(linkManager, params): Link
Parameters
Parameter | Type |
---|---|
linkManager | LinkManagerService |
params | LinkParams |
Returns
Source
Accessors
isActive
get isActive(): boolean
Whether this route is currently active, including potentially supplied models and query params.
Returns
boolean
Source
isActiveWithoutModels
get isActiveWithoutModels(): boolean
Whether this route is currently active, but ignoring models and query params.
Returns
boolean
Source
isActiveWithoutQueryParams
get isActiveWithoutQueryParams(): boolean
Whether this route is currently active, including potentially supplied models, but ignoring query params.
Returns
boolean
Source
isEntering
get isEntering(): boolean
Whether this route is currently being transitioned into / entered.
Returns
boolean
Source
isExiting
get isExiting(): boolean
Whether this route is currently being transitioned out of / exited.
Returns
boolean
Source
models
get models(): RouteModel[]
The route models passed in this link.
Returns
RouteModel
[]
Source
qualifiedRouteName
get qualifiedRouteName(): string
The fully qualified target route name of this link.
Returns
string
Source
queryParams
get queryParams(): undefined | QueryParams
The query params for this link, if specified.
Returns
undefined
| QueryParams
Source
routeName
get routeName(): string
The target route name of this link.
Returns
string
Source
url
get url(): string
The URL for this link that you can pass to an <a>
tag as the href
attribute.
Returns
string
Source
Methods
open()
open(event?): undefined | PublicTransition
Parameters
Parameter | Type |
---|---|
event ? | unknown |
Returns
undefined
| PublicTransition
Source
replaceWith()
replaceWith(event?): undefined | PublicTransition
Transition into the target route while replacing the current URL, if possible.
Parameters
Parameter | Type |
---|---|
event ? | unknown |
Returns
undefined
| PublicTransition
Source
toString()
toString(): string
Alias for url
.
Allows for more ergonomic composition as query parameters.
{{link "foo" query=(hash bar=(link "bar"))}}
Returns
string
Source
transitionTo()
transitionTo(event?): undefined | PublicTransition
Transition into the target route.
Parameters
Parameter | Type |
---|---|
event ? | unknown |
Returns
undefined
| PublicTransition