Skip to main content
cngx-src documentation

CngxMaterialBidirectionalSyncOptions

Interface

projects/common/data/material-bridge/bidirectional-sync.ts

Import#

import { CngxMaterialBidirectionalSyncOptions } from '@cngx/common/data'

Description#

Options for createMaterialBidirectionalSync.

Material types never enter this surface. The caller maps Material's own event/property shape to a host-agnostic Signal<number> / Observable<number> / getter / setter at the directive boundary.
That keeps @cngx/common/data independent of @angular/material.

Index#

Instance Properties#

destroyRef#DestroyRef
Readonly

DestroyRef used to clean up the effect and the subscription.

injector#Injector
Readonly

Injector used to install the effect inside an injection context.

onMaterialSelection#function
Readonly

Routes a Material→presenter selection event into the presenter's select(idx) method. Subject to an equality guard against presenterIndex() so re-entrant events (the presenter's own write firing back through Material) drop without re-routing.

presenterIndex#Signal
Readonly

Reactive source for the presenter's current index. The factory's effect() tracks this signal — when it changes, Material is written (subject to the equality guard against the Material read-side).

readSelectedIndex#function
Readonly

Pulls the Material instance's current selectedIndex (or equivalent). Called inside untracked() so the effect does not subscribe to any signals the getter might read internally.

selectionChange$#Observable
Readonly

Stream of Material-driven selection changes, already mapped to a plain index by the caller (MatTabGroup.selectedIndexChange forwards directly; MatStepper.selectionChange needs .pipe(map(e => e.selectedIndex))).

writeSelectedIndex#function
Readonly

Writes the Material instance's selectedIndex (or equivalent). Called inside untracked() per reference_signal_architecture rule 2.