angular-material-7

CdkDragDrop and ngTemplateOutlet

删除回忆录丶 提交于 2019-12-02 05:18:44
I'm trying to use Drag&Drop features relased with Angular Material 7. I separated my template in reusable pieces using ngTemplateOutlet and every option can be either a Thing ™ or a nested Thing ™ which have some more sub-Things ™. Nested Things ™ are displayed as an expansion panel. I want all the first-level Things ™ to be re-orderable as if thery were a list. ( Ok, ok, it's obvious that's a reorderable sidenav with normal and nested options, just pretend it's not so obvious ) This is the code I initially wrote. <div cdkDropList (cdkDropListDropped)="dropItem($event)" lockAxis="y"> <ng