I'm trying to use Drag&Drop features released with Angular Material 7. And dynamically creating component using ng-tempalte.
<div cdkDropList (cdkDropListDropped)="dropLocal($event)">
<ng-template #components></ng-template>
</div>
and added cdkDrag at components.
I am using createComponent at parent component to keep on create components.
viewContainerRef.createComponent
but dragdrop functionality is not functional since cdkDrag must be in a tag nested inside the one with cdkDropList, otherwise the dragged element won't detect the drop zone.
reference :https://stackoverflow.com/a/54158293/4481952
Is there a way around to make dropfunctionality work?
demo code https://stackblitz.com/edit/angular-ngtemplate-reorder?file=src%2Fapp%2Fapp.component.html