title: How to delete items in Drag and Drop Angular Cdk 8.0.0
body: <p>I usign drag and drop in proyect using angular 6 and angular-cdk 8.0.0, i need to move the elements for know where is the order, update and aslo delete them but i dont know how can do that </p>
  
  <p>I tryed to use the api in angular cdk but im got more confuse and me tried to delete the item from array but the drag an drop has been corrupted</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div cdkDropList class="example-list" (cdkDropListDropped)="drop($event)"&gt;
        &lt;div class="example-box" *ngFor="let name of names" cdkDrag&gt;
          {{name}}
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <pre><code>  names: string[];
    order: number[];
  
    drop(event: CdkDragDrop&lt;string[]&gt;) {
      moveItemInArray(this.order, event.previousIndex, event.currentIndex);
      moveItemInArray(this.names, event.previousIndex, event.currentIndex);
    }
  onYesClick(): void {
     for(let i = 0; i &lt; this.names.length; i++){
     this.dashboard.updateChartOrder(this.charts[i],this.order[i]).subscribe();
  
     }
      this.dialogRef.close({});
    }
  </code></pre>
  
  <p>The error has been had es the item never dessapear when i delete the item from array</p>