• Overview
@angular/cdk/drag-drop

createDragRef

function

Creates a DragRef for an element, turning it into a draggable item.

API

function createDragRef<T = unknown>(  injector: Injector,  element: any,  config?: DragRefConfig,): DragRef<T>;

createDragRef

Creates a DragRef for an element, turning it into a draggable item.

@paraminjectorInjector

Injector used to resolve dependencies.

@paramelementany

Element to which to attach the dragging functionality.

@paramconfigDragRefConfig

Object used to configure the dragging behavior.

@returnsDragRef<T>
Jump to details