Skip to main content
cngx-src documentation

withRevealOnNavigate

Functioncommon/interactive/errorv0.1.0

projects/common/interactive/error-registry/provide-error-registry.ts

Description#

Reveals every registered scope on Router.NavigationStart.

Requires provideRouter() (or equivalent) in the host environment. No-op when no Router is provided so the feature degrades gracefully in test harnesses or non-routed apps.

Fires before route guards. NavigationStart emits before CanActivate / CanDeactivate guards run, so a navigation that gets cancelled by a guard still leaves every scope revealed. Acceptable for the common pattern (reveal-all on attempted navigation) but surface the implication when wiring a guard that cancels based on form errors.

Signature#

withRevealOnNavigate()

Returns#

ErrorRegistryFeature