class TestNavigationController
A class that encapsulates the current navigation location, simulating browser-like behavior.
class TestNavigationController extends NavigationController
Constructor
- constructor()Creates a new managed object.
Instance Members
- navigateAsync(target, mode?)Navigates to the provided target.
- userNavigation(pageId, detail?)Sets the provided location immediately, simulating external navigation.
- userBack()Removes the last path in navigation history immediately, simulating external ‘back’ navigation.
- clear()Clears navigation history and restores the initial location.
- getHistory()Returns a list of all locations currently in navigation history.
Inherited Members
- pageIdThe current page location, read-only.
- detailThe current location detail.
- set(pageId, detail?)Sets the current location.
- 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.