File

src/preview.component.ts

Description

If you pass an <ng-template let-type let-item="item"> to <skyhook-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:

<skyhook-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>
</skyhook-preview>

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector skyhook-preview
template
<ng-container *ngIf="collect$|async as c">
    <skyhook-preview-renderer *ngIf="c.previewEnabled">
    <ng-container *ngIf="c.isDragging" >
        <ng-container
            *ngTemplateOutlet="content; context: { $implicit: c.itemType, type: c.itemType, item: c.item }">
        </ng-container>
        </ng-container>
    </skyhook-preview-renderer>
</ng-container>

Index

Inputs

Inputs

allBackends
Default value : false

Disables the check for whether the current MultiBackend wants the preview enabled

result-matching ""

    No results matching ""