• Overview
@angular/cdk/drag-drop

copyArrayItem

function

Copies an item from one array to another, leaving it in its original position in current array.

API

  
    function copyArrayItem<T = any>(  currentArray: T[],  targetArray: T[],  currentIndex: number,  targetIndex: number): void;
  
  

copyArrayItem

void

Copies an item from one array to another, leaving it in its original position in current array.

@paramcurrentArrayT[]

Array from which to copy the item.

@paramtargetArrayT[]

Array into which is copy the item.

@paramcurrentIndexnumber

Index of the item in its current array.

@paramtargetIndexnumber

Index at which to insert the item.

@returnsvoid
Jump to details