CngxTabsCommitActionSource
projects/common/tabs/commit-action.token.ts
Referenced by#
Import#
import { CngxTabsCommitActionSource } from '@cngx/common/tabs'
Description#
Source supplied through CNGX_TABS_COMMIT_ACTION.
A sync directive (e.g. [cngxTabsRouteSync]) provides one so the presenter
picks up a commit-action without the consumer hand-binding
[commitAction].
Carries mode alongside action so the routed
path can pin pessimistic - the active tab must follow the resolved
route, and a stray [commitMode]="'optimistic'" must not override
that invariant.
Index#
Instance Properties#
The commit-action the presenter runs on a tab switch, or null when
the source has nothing to gate with (e.g. a route-sync without a
Router). A non-null value activates this source over the
presenter's [commitAction] input.
Commit semantics for this source. When action() is non-null, this
wins over the presenter's [commitMode] input - the route-sync pins
'pessimistic' so the active tab follows the resolved route.