class RouterNavigator
package feathers.controls.navigators
extends BaseNavigator › FeathersControl › MeasureSprite › ValidatingSprite
Integrates with the HTML5 history API to allow navigation between views, including support for the browser's native back and forward buttons.
This component is designed for use in web browsers, but provides a decent
implementation for native apps. Ideally, native apps should use
StackNavigator
instead, as it provides more advanced navigation
capabilities that are impossible to integrate with the HTML5 history API.
1.0.0
.See also:
Constructor
Variables
basePath:String = null
The base URL path where the project will be deployed.
For example, if your project will be deployed to
https://www.example.com/my-project/
, the base path will be
/my-project
.
1.0.0
.backTransition:(DisplayObject, DisplayObject) ‑> IEffectContext
The default transition to use for back navigation actions.
1.0.0
.See also:
forwardTransition:(DisplayObject, DisplayObject) ‑> IEffectContext
The default transition to use for forward navigation actions.
1.0.0
.See also:
replaceTransition:(DisplayObject, DisplayObject) ‑> IEffectContext
The default transition to use for replace navigation actions.
1.0.0
.Methods
addRoute(route:Route):Void
Adds a route to the navigator.
The following example adds a new route for the "/settings" URL path:
var route = Route.withClass("/settings", SettingsView);
navigator.addRoute(route);
1.0.0
.go(n:Int, ?transition:(DisplayObject, DisplayObject) ‑> IEffectContext):DisplayObject
Moves the pointer in the history stack by n entries.
The following examples goes back 2 entries in the history stack.
navigator.go(-2);
1.0.0
.goBack(?transition:(DisplayObject, DisplayObject) ‑> IEffectContext):DisplayObject
Navigates to the previous item on the history stack.
The following examples goes back in history by 1 entry.
navigator.goBack();
1.0.0
.goForward(?transition:(DisplayObject, DisplayObject) ‑> IEffectContext):DisplayObject
Navigates to the next item on the history stack.
The following examples goes forward in history by 1 entry.
navigator.goForward();
1.0.0
.push(path:String, ?state:Dynamic, ?transition:(DisplayObject, DisplayObject) ‑> IEffectContext):DisplayObject
Pushes a new entry onto the history stack. The route to display will be determined automatically.
The following example navigates to the "/settings" URL path:
navigator.push("/settings");
1.0.0
.See also:
replace(path:String, ?state:Dynamic, ?transition:(DisplayObject, DisplayObject) ‑> IEffectContext):DisplayObject
Replaces the current entry onto the history stack. The route to display will be determined automatically.
The following example navigates to the "/settings" URL path without adding a new history entry:
navigator.replace("/settings");
1.0.0
.See also: