CngxMatTabErrorFlag
projects/ui/mat-tabs/mat-tab-error-flag.directive.ts
Import#
import { CngxMatTabErrorFlag } from '@cngx/ui/mat-tabs'
Description#
Per-tab direct invalid flag for [cngxMatTabs] - the simple-case
sibling to [cngxMatTabError]. Attach to a <mat-tab>; the bound
string | boolean writes the per-handle directError slot, which
folds into the handle's hasError / errorMessage. A non-empty
string doubles as the SR descriptor message; true marks the tab
invalid with no message; false / '' clear it.
Symmetric with [cngxMatTabError] (one directive, one
responsibility - Pillar 3): the aggregator stays the rich
multi-source path, this is the "this tab is invalid" marker that
needs no aggregator boilerplate. A bare cngxMatTabErrorFlag
attribute (no brackets) binds the empty string and is coerced to
true so presence alone marks the tab invalid.
Locates its target via CNGX_MAT_TABS_REGISTRY_HOST, tracks
presenter.tabs() to recover from the content-init race, and
clears the slot on destroy - exactly as CngxMatTabError.