class NavigationController
An object that encapsulates the current location within the application navigation stack, part of the global application context.
class NavigationController extends ManagedObject
Notes
- This object contains the current location, represented as page ID and detail strings. In a URL-like path, the page ID is the first segment, and the detail is the remainder of the path.
- When overridden by a platform-specific (or test) implementation, this object also provides a way to navigate to a new location.
Type Members
- type NavigationController.NavigationMode staticType definition for an object supported by app.navigate() and NavigationController.navigateAsync() that indicates how a new location should be applied.
Instance Members
- pageIdThe current page location, read-only.
- detailThe current location detail.
- set(pageId, detail?)Sets the current location.
- clear()Resets the current location without navigating.
- navigateAsync(target?, mode?)Navigates to the specified location.
Inherited Members
- emit(event)Emits an event, immediately calling all event handlers.
- emitChange(name?, data?)Emits a change event, an instance of ManagedChangeEvent.
- listen(handler)Adds a handler for all events emitted by this object.
- isUnlinked()Returns true if the object has been unlinked.
- unlink()Unlinks this managed object.
- beforeUnlink() protectedA method that’s called immediately before unlinking an object, can be overridden.
- attach(target, observer?) protectedAttaches the provided managed object to this object.
- autoAttach(propertyName, observer?) protectedObserves a property, so that any object assigned to it is attached immediately.