src/preview.ts
If you pass an <ng-template let-type let-item="item">
to <dnd-preview>
as a child,
then that template will be rendered so as to follow the mouse around while dragging.
What you put in that template is up to you, but in most cases this will be:
<dnd-preview>
<ng-template let-type let-item="item">
<ng-content [ngSwitch]="type">
<!-- one kind of preview per type, using *ngSwitchCase="'TYPE'" -->
<div *ngSwitchCase="'TYPE'">{{ item | json }}</div>
</ng-content>
</ng-template>
</dnd-preview>
PreviewListener
OnInit
OnDestroy
changeDetection | ChangeDetectionStrategy.OnPush |
selector | dnd-preview |
standalone | true |
imports |
AsyncPipe
NgTemplateOutlet
DndPreviewRenderer
|
template |
|
Inputs |
allBackends |
Type : boolean
|
Default value : false
|
Disables the check for whether the current MultiBackend wants the preview enabled |