Angular Material 7 拖放

Angular Material 7 Drag and Drop

谁能解释一下或者告诉我一些他将如何执行以下操作的代码:

I have a match - with all assigned players to a team, then i have a starting eleven (11 placeholders on a map) and 7 positions on the teams bench.

我现在如何将球员拖放到足球场和替补席上指定的占位符上?如果我把它放到一个占位符上,占位符不应该是可见的——但是拖动的内容——我需要这个拖动的内容(拖动的播放器)的 id 来更新 match.startingEleven、match.substitutes 并删除播放器来自 match.assignedPlayers 列表。

Chore Board 项目 (demo, repo) 实现了类似的模式,可能会有所帮助。

我曾尝试使用 angular 7 拖放(有几篇文章展示了如何操作)。然而,由于我的要求更加复杂(将项目组或组内的单个项目拖动),我选择了原生 HTML5 解决方案。