To do this we use a method, visibleNodes: FileNode[] which constructs an array.
basicDrag an external element into the tree. You can use the [treeDrag] directive to allow dragging external elements into the tree. Then use a custom action to handle the drop.

You specify the element that will be reported as 'from' in actionMapping (instead of the node when dragging a tree node). use (treeDrop) to drag an external element to the tree. treeDrop) ="onDrop (event)" [ treeAllowDrop] ="stumpdrop.club (this)"> onDrop (event) { // Dropped stumpdrop.clubt } allowDrop (element) { // Return true/false based on element } Use stumpdrop.clubt inside the callback.
The Material CDK released Drag and Drop in version 7, and it offers a powerful api for supporting drag and drop in your Angular app! The Material Tree is also a recent addition to Material, and it makes it possible to display structured data like a file explorer. Together, Drag and Drop and Material Tree don’t work out of the box because you have to manipulate the data based on the input from the drag and drop. Jun 30, Drag and Drop in Angular TreeView component.
The TreeView component allows you to drag and drop any node by setting allowDragAndDrop to true. Nodes can be dragged and dropped at all levels of the same TreeView. The dragged nodes can be dropped at any level by indicator lines with line, plus/minus, and restrict icons.
Feb 15, Angular: Drag and drop for trees - customisation. To my understanding the new Angular 7 provides Drag and Drop features.
I post my solution on StackBlitz in case somebody else wanna make additional adjustments.
I searched for the Tree component about the DnD but didn't find much related to trees. One working expample I've found on Stackblitz. Compared with the drag'ndrop features summarized here the solution looks sober.