Nestable2
Nestable2 copied to clipboard
hi,I want to use Nestable in the angular project,How do I use it
Expected behavior
Actual behavior
Steps to reproduce the behavior
Fork this template to reproduce issue.
我写的:
<ng-template #tree let-node="node">
<ol class="dd-list">
<li class="dd-item dd3-item" [class]="item.classes" [attr.data-id]="item.id" *ngFor="let item of node">
<div class="dd-handle dd3-handle" (mouseenter)="itemButtonShow[item.id]=true"
(mouseleave)="itemButtonShow[item.id]=false" (touchstart)="itemTouchStart(item)">
<div class="dd3-content">
{{item.content}}
</div>
</div>
<ng-container *ngIf="item.children">
<ng-template *ngTemplateOutlet="tree;context:{node:item.children}"></ng-template>
</ng-container>
</li>
</ol>
</ng-template>