• Overview
@angular/cdk/drag-drop

moveItemInArray

function

Moves an item one index in an array to another.

API

  
    function moveItemInArray<T = any>(  array: T[],  fromIndex: number,  toIndex: number): void;
  
  

moveItemInArray

void

Moves an item one index in an array to another.

@paramarrayT[]

Array in which to move the item.

@paramfromIndexnumber

Starting index of the item.

@paramtoIndexnumber

Index to which the item should be moved.

@returnsvoid
Jump to details