Skip to content

Instantly share code, notes, and snippets.

@KylerJohnson26
Last active December 16, 2018 16:35
Show Gist options
  • Save KylerJohnson26/28a2f5a223f325fd52130c147a7efa06 to your computer and use it in GitHub Desktop.
Save KylerJohnson26/28a2f5a223f325fd52130c147a7efa06 to your computer and use it in GitHub Desktop.
DragDropDemo-html3
<div id="pagewrapper">
<section class="todos-section-wrapper">
<mat-card class="card">
<mat-card-header class="card-header">
<mat-card-title class="card-title">To-dos</mat-card-title>
</mat-card-header>
<mat-card-content class="card-content">
<div
class="list"
cdkDropList
[cdkDropListData]="todos"
(cdkDropListDropped)="drop($event)">
<div class="todo-item" *ngFor="let todo of todos" cdkDrag>{{todo}}</div>
</div>
</mat-card-content>
</mat-card>
<mat-card class="card">
<mat-card-header class="card-header">
<mat-card-title class="card-title">Completed</mat-card-title>
</mat-card-header>
<mat-card-content class="card-content">
<div
class="list"
cdkDropList
[cdkDropListData]="completed"
(cdkDropListDropped)="drop($event)">
<div class="todo-item" *ngFor="let todo of completed" cdkDrag>{{todo}}</div>
</div>
</mat-card-content>
</mat-card>
</section>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment