I am using Angular Material's Drag and Drop Module. How ever cdkDrag
doesn't seem to work with span
and other few tags that I observed like a
tag.
component.html
<div class='user' *ngFor='let user of usersTask; let i = index'>
User: {{i}}
<span class='task' *ngFor='let task of user' cdkDropList cdkDrag>
{{task}}
</span>
</div>
component.ts
import { Component } from '@angular/core';
@Component({
selector: 'some-root',
templateUrl: './some.component.html',
styleUrls: ['./some.component.scss']
})
export class SomeComponent {
usersTask = [[
'Get to work',
'Pick up groceries',
'Go home',
'Fall asleep'
],[
'Get up',
'Brush teeth',
'Take a shower',
'Check e-mail',
'Walk dog'
]];
}
But, It works, if I replace span
with div
tag.
Any idea, why is this happening? And how to solve this issue?
Thanks in advance!