错误在下面的代码中指出:
<div
id="scripture"
cdkDropList
[cdkDropListData]="words" <==== The square brackets around [cdkDropListData] and the correct list name
cdkDropListConnectedTo="wordbox"
(cdkDropListDropped)="wordDrop($event)">
<div
class="word-container unselect"
*ngFor="let wd of words">
{{wd}}
</div>
</div>
<div
id='wordbox' <=== the correct id is wordbox, instead of wordbank
cdkDropList
[cdkDropListData]="wordbank" <==== The square brackets around [cdkDropListData]
cdkDropListConnectedTo="scripture"
(cdkDropListDropped)="wordDrop($event)">
<div
class="word-piece unselect"
*ngFor="let wd of wordbank"
cdkDrag
cdkDragBoundary=".drop-targets"
[cdkDragData]="wd">
{{wd}}</div>
</div>