I am using angular material drag and drop cdk (reference: https://material.angular.io/cdk/drag-drop/overview).
The drag - drop works fine, but when I try to preset its x-y co-ordinates using [cdkDragFreeDragPosition] it shows error:
compiler.js:1021 Uncaught Error: Template parse errors:
Can't bind to 'cdkDragFreeDragPosition' since it isn't a known property of 'div'. ("FreeDragPosition]="dragPosition" -->
<!-- [cdkDragFreeDragPosition]="{x:10, y:10}" -->
Here is my module:
import { DragDropModule } from '@angular/cdk/drag-drop';
...
@NgModule({
imports: [
...
DragDropModule
...
export class AppModule { }
and component.html
<div cdkDrag [cdkDragFreeDragPosition]="{x:10, y:10}">
content goes here...
</div>
Could someone suggest me where I made mistake? Thanks in advance...
Update: my Angular version is 6 and @angular cdk is 7.3.7