Class

PopArrayItemEvent

@ng-forge/dynamic-forms

Event dispatched to remove the LAST item from an array field.

Equivalent to JavaScript's Array.pop() - removes from the end. For removing from the beginning, use {@link ShiftArrayItemEvent}. For removing at a specific index, use {@link RemoveAtIndexEvent}.

Signature

class PopArrayItemEvent
  implements FormEvent

Properties

NameTypeDescription
type "pop-array-item"-

Examples

// Use the builder API (recommended)
eventBus.dispatch(arrayEvent('contacts').pop());

// Or instantiate directly
eventBus.dispatch(new PopArrayItemEvent('contacts'));