Event bus service for form-wide event communication.
Provides type-safe event dispatching and subscription for form components to communicate without direct coupling. Uses RxJS observables for reactive event handling and supports both single event type and multiple event type subscriptions.
Creates an instance of the provided event constructor and broadcasts it through the event pipeline to all active subscribers.
If withEventFormValue() is enabled globally or options.emitFormValueOnEvents is set to true in the form config, the current form value will be attached to the event's formValue property.
// Dispatch a submit eventeventBus.dispatch(SubmitEvent);// Dispatch a custom eventeventBus.dispatch(CustomFormEvent);
on()
Subscribes to form events with type-safe filtering.
Provides a reactive stream of events filtered by type. Supports both single event type subscriptions and multi-type subscriptions for flexible event handling.