Skip to content

Instantly share code, notes, and snippets.

@lydemann
Created November 17, 2018 17:11
Show Gist options
  • Save lydemann/fffca08c8a2e542ff87a043a6490792e to your computer and use it in GitHub Desktop.
Save lydemann/fffca08c8a2e542ff87a043a6490792e to your computer and use it in GitHub Desktop.
todo-list.component.html
<div class="todo-list-wrapper">
<div class="mx-auto col-10">
<h5>{{'todo-list' | translate}}</h5>
<hr>
<app-cards-list [listRef]="todoListRef" [cardRef]="todoItemCardRef" [data]="todoList"></app-cards-list>
</div>
<hr>
<app-add-todo [currentTODO]="currentTODO"></app-add-todo>
</div>
<ng-template #todoItemCardRef let-todo="data">
<app-todo-item-card [todoItem]="todo" (todoDelete)="deleteTodo($event)" (todoEdit)="editTodo($event)"></app-todo-item-card>
</ng-template>
<ng-template #todoListRef let-todos="data">
<ul class="list-group mb-3">
<app-todo-item-list-row *ngFor="let todo of todos" [todoItem]="todo" (todoDelete)="deleteTodo($event)" (todoEdit)="editTodo($event)"></app-todo-item-list-row>
</ul>
</ng-template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment