An individual item that will be displayed by a RouterNavigator component. Provides the URL path, the view, and an optional list of events to map to actions (like navigate) on the RouterNavigator.

Available since

1.0.0

.

See also:

Static methods

staticwithClass(path:String, viewClass:Class<DisplayObject>, ?actions:Map<String, RouterAction>, ?injectState:(view:Dynamic, state:Dynamic) ‑> Void):Route

Creates a Route that instantiates a view from a class that extends DisplayObject when the RouterNavigator requests the item's view.

staticwithDisplayObject(path:String, viewInstance:DisplayObject, ?actions:Map<String, RouterAction>, ?injectState:(view:Dynamic, state:Dynamic) ‑> Void):Route

Creates a Route that always returns the same DisplayObject instance when the RouterNavigator requests the item's view.

staticwithFunction(path:String, viewFunction:() ‑> DisplayObject, ?actions:Map<String, RouterAction>, ?injectState:(view:Dynamic, state:Dynamic) ‑> Void):Route

Creates a Route that calls a function that returns a DisplayObject when the RouterNavigator requests the item's view.

Variables

path:String

The URL path associated with this route.

Available since

1.0.0

.

Methods

dynamicinjectState(view:DisplayObject, state:Dynamic):Void

An optional function to parse the current history state when a view is shown.

Available since

1.0.0

.

setAction(eventType:String, action:RouterAction):Void

Sets a new action to perform when the view dispatches an event. If the action is null, removes an action that was set previously.

Available since

1.0.0

.