Skip to content

ui-router-registry / TypedStateService

Interface: TypedStateService ​

Defined in: registry.ts:321

A typed view of core's StateService. Core's own class is assignable to it, so a typed getter or field needs no cast and emits nothing.

Extends ​

  • Omit<StateService, "go" | "transitionTo" | "target" | "href" | "is" | "includes">

Methods ​

go() ​

ts
go<T>(to, ...args): TransitionPromise;

Defined in: registry.ts:326

StateService.go, with a registered name's params required as declared.

Type Parameters ​

Type Parameter
T extends | string | UncheckedRef | StateDeclaration | StateObject

Parameters ​

ParameterType
toT & CheckRelative<T>
...argsTargetArgs<T, TransitionOptions>

Returns ​

TransitionPromise


href() ​

ts
href<T>(stateOrName, ...args): string;

Defined in: registry.ts:344

StateService.href, typed as for go.

Type Parameters ​

Type Parameter
T extends | string | UncheckedRef | StateDeclaration | StateObject

Parameters ​

ParameterType
stateOrNameT & CheckRelative<T>
...argsTargetArgs<T, HrefOptions>

Returns ​

string


includes() ​

Call Signature ​

ts
includes<N>(
   stateOrName, 
   params?, 
   options?
): boolean;

Defined in: registry.ts:363

StateService.includes, over registered names, globs and their params.

Type Parameters ​
Type Parameter
N extends string
Parameters ​
ParameterType
stateOrNamestring | N
params?Partial<RawParams>
options?TransitionOptions
Returns ​

boolean

Call Signature ​

ts
includes(
   stateOrName, 
   params?, 
   options?
): boolean;

Defined in: registry.ts:369

StateService.includes for an UncheckedRef or an object target, with loose params.

Parameters ​
ParameterType
stateOrName| UncheckedRef | StateDeclaration | StateObject
params?RawParams
options?TransitionOptions
Returns ​

boolean


is() ​

Call Signature ​

ts
is<N>(
   stateOrName, 
   params?, 
   options?
): boolean;

Defined in: registry.ts:350

StateService.is, over registered names and their params.

Type Parameters ​
Type Parameter
N extends string
Parameters ​
ParameterType
stateOrNameN
params?Partial<RawParams>
options?{ relative?: | string | StateDeclaration | StateObject; }
options.relative?| string | StateDeclaration | StateObject
Returns ​

boolean

Call Signature ​

ts
is(
   stateOrName, 
   params?, 
   options?
): boolean;

Defined in: registry.ts:356

StateService.is for an UncheckedRef or an object target, with loose params.

Parameters ​
ParameterType
stateOrName| UncheckedRef | StateDeclaration | StateObject
params?RawParams
options?{ relative?: | string | StateDeclaration | StateObject; }
options.relative?| string | StateDeclaration | StateObject
Returns ​

boolean


target() ​

ts
target<T>(identifier, ...args): TargetState;

Defined in: registry.ts:338

StateService.target, typed as for go.

Type Parameters ​

Type Parameter
T extends | string | UncheckedRef | StateDeclaration | StateObject

Parameters ​

ParameterType
identifierT & CheckRelative<T>
...argsTargetArgs<T, TransitionOptions>

Returns ​

TargetState


transitionTo() ​

ts
transitionTo<T>(to, ...args): TransitionPromise;

Defined in: registry.ts:332

StateService.transitionTo, typed as for go.

Type Parameters ​

Type Parameter
T extends | string | UncheckedRef | StateDeclaration | StateObject

Parameters ​

ParameterType
toT & CheckRelative<T>
...argsTargetArgs<T, TransitionOptions>

Returns ​

TransitionPromise