While utilizing the Angular CDK drag and drop module, I have observed that it functions seamlessly on html elements like div, p, etc. However, when I apply a cdkDrag directive to a component, it does not seem to work as expected.
<!-- IT WORKS -->
<div cdkDrag>content</div>
<!-- IT DOESN'T WORK -->
<my-component cdkDrag></my-component>
Additionally, I have noticed that by default, every component in Angular is automatically set to a width and height of auto
, essentially rendering them at 0x0 dimensions unless I manually adjust the CSS and add display: block
to the component's style.