Class
PopArrayItemEvent
@ng-forge/dynamic-forms
Event dispatched to remove the LAST item from an array field.
Equivalent to JavaScript's Array. - removes from the end.
For removing from the beginning, use {@link ShiftArrayItemEvent}.
For removing at a specific index, use {@link RemoveAtIndexEvent}.pop()
Signature
class PopArrayItemEvent
implements FormEventProperties
| Name | Type | Description |
|---|---|---|
type | "pop-array-item" | - |
Examples
// Use the builder API (recommended)
eventBus.dispatch(arrayEvent('contacts').pop());
// Or instantiate directly
eventBus.dispatch(new PopArrayItemEvent('contacts'));packages/dynamic-forms/src/lib/events/constants/pop-array-item.event.ts:19