Table of Contents

Event OnLocationChanged

Namespace
Velvet
Assembly
Velvet.Docs.dll

Raised after each successful navigation with the new location. Also re-emitted, with a fresh location identity, when a Suspend-mode loader resolves within the current location, and when a submission's action returns a result for a route the current location matches. A subscriber that throws out of a loader's re-emit is reported to the console and the resolution stands: the loader's round settles and the route keeps what the loader produced. The same holds for the re-emit that follows a loader failing, where what it keeps is that failure. A subscriber whose own navigation commits while the router is announcing a location is the last that location reaches: the subscribers after it hear the newer one, which that navigation announces, and not the one it left.

public event Action<RouterLocation> OnLocationChanged

Returns

Action<RouterLocation>
Raised after each successful navigation with the new location. Also re-emitted, with a fresh location identity, when a Suspend-mode loader resolves within the current location, and when a submission's action returns a result for a route the current location matches. A subscriber that throws out of a loader's re-emit is reported to the console and the resolution stands: the loader's round settles and the route keeps what the loader produced. The same holds for the re-emit that follows a loader failing, where what it keeps is that failure. A subscriber whose own navigation commits while the router is announcing a location is the last that location reaches: the subscribers after it hear the newer one, which that navigation announces, and not the one it left.