Sortable enables you to bind it to an array of strings or objects by setting the
data property of the
Sorting items using either drag-and-drop operations or the keyboard navigation will emit events, such as
dragEnd and others. The events provide the information neccessary for manipulating the dataset manually or through the Sortable's API.
The Sortable provides the built-in
SortableBindingDirective directive, which simplifies the handling of data operations by cutting down the repetitive boilerplate code.
SortableBindingDirective will seamlessly keep the Sortable items and the data array passed to it in sync.
The following example demonstrates how to set up the binding.