Package org.angular.ts.ng
Interface StateService<TRouteMap>
@JsType(isNative=true,
name="ng.StateService",
namespace="<global>")
public interface StateService<TRouteMap>
Public AngularTS StateService contract exposed through the global ng namespace for Closure-annotated applications.
-
Method Summary
Modifier and TypeMethodDescriptionThe current state declaration, when navigation has selected one.jsinterop.base.JsPropertyMap<Object> The latest successful state parameters.Return one matching public state declaration.elemental2.core.JsArray<StateDeclaration> Return every public state declaration.<TRouteName>
ObjectOverload for typed route names and params.<TRouteName>
StringOverload for typed route names and params.booleanCheck whether the current state matches a state, ancestor, or glob.<TRouteName>
elemental2.promise.Promise<Void> Prefetch lazy declarations and templates for a typed route.voidsetCurrent(StateDeclaration current) The current state declaration, when navigation has selected one.voidThe latest successful state parameters.Build a target that can be returned from a transition hook.
-
Method Details
-
getCurrent
The current state declaration, when navigation has selected one. -
getParams
The latest successful state parameters. -
getState
Return one matching public state declaration.- Parameters:
stateOrName- Value supplied for the stateOrName parameter.base- Value supplied for the base parameter.- Returns:
- Method result.
-
getStates
elemental2.core.JsArray<StateDeclaration> getStates()Return every public state declaration.- Returns:
- Method result.
-
go
Overload for typed route names and params. Untyped overload used when no route map is supplied.- Parameters:
to- Value supplied for the to parameter.var_args- Value supplied for the args parameter.- Returns:
- Method result.
-
href
Overload for typed route names and params. Untyped overload used when no route map is supplied.- Parameters:
stateOrName- Value supplied for the stateOrName parameter.var_args- Value supplied for the args parameter.- Returns:
- Method result.
-
matches
Check whether the current state matches a state, ancestor, or glob.- Parameters:
stateOrName- Value supplied for the stateOrName parameter.params- Value supplied for the params parameter.options- Value supplied for the options parameter.- Returns:
- Method result.
-
prefetch
Prefetch lazy declarations and templates for a typed route. Prefetch lazy declarations and templates without navigating.- Parameters:
stateOrName- Value supplied for the stateOrName parameter.var_args- Value supplied for the args parameter.- Returns:
- Method result.
-
setCurrent
The current state declaration, when navigation has selected one. -
setParams
The latest successful state parameters. -
target
Build a target that can be returned from a transition hook.- Parameters:
identifier- Value supplied for the identifier parameter.params- Value supplied for the params parameter.options- Value supplied for the options parameter.- Returns:
- Method result.
-