RamonSmit / Nestable2

New pickup of Nestable!
Other
322 stars 147 forks source link

hi,I want to use Nestable in the angular project,How do I use it #82

Open zhangyuyuan123 opened 7 years ago

zhangyuyuan123 commented 7 years ago

Expected behavior

Actual behavior

Steps to reproduce the behavior

Fork this template to reproduce issue.

WongYueKeung commented 2 years ago

我写的:

<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>