diff --git a/db.json b/db.json index 1707711..825f3eb 100644 --- a/db.json +++ b/db.json @@ -1,10 +1,16 @@ { "tasks": [ { - "title": "Angular 6", + "title": "Sleep", "completed": false, "editing": false, "id": 1 + }, + { + "title": "Dance", + "completed": false, + "editing": false, + "id": 2 } ] } \ No newline at end of file diff --git a/src/app/Todo-List-App/components/todo-empty/todo-empty.component.html b/src/app/Todo-List-App/components/todo-empty/todo-empty.component.html index 1b77219..08682d1 100644 --- a/src/app/Todo-List-App/components/todo-empty/todo-empty.component.html +++ b/src/app/Todo-List-App/components/todo-empty/todo-empty.component.html @@ -1,4 +1,4 @@ -
+

All Task Accomplished 👻

to-do diff --git a/src/app/Todo-List-App/components/todo-empty/todo-empty.component.ts b/src/app/Todo-List-App/components/todo-empty/todo-empty.component.ts index 66530de..0c90943 100644 --- a/src/app/Todo-List-App/components/todo-empty/todo-empty.component.ts +++ b/src/app/Todo-List-App/components/todo-empty/todo-empty.component.ts @@ -1,9 +1,22 @@ import { Component, OnInit } from '@angular/core'; +import { animate, style, transition, trigger } from '@angular/animations'; @Component({ selector: 'todo-empty', templateUrl: './todo-empty.component.html', - styleUrls: ['./todo-empty.component.css'] + styleUrls: ['./todo-empty.component.css'], + animations: [ + trigger('fade', [ + transition(':enter', [ + style({opacity: 0, transform: 'translateX(-30px)'}), + animate(1200, style({opacity:0, transform: 'translateY(0px)'})) + ]), + transition(':leave', [ + style({opacity: 0, transform: 'translateX(0px)'}), + animate(1000, style({opacity:1, transform: 'translateX(-50px)'})) + ]) + ]) +] }) export class TodoEmptyComponent implements OnInit { diff --git a/src/app/Todo-List-App/containers/TodoList/todo-list.component.html b/src/app/Todo-List-App/containers/TodoList/todo-list.component.html index 65f1541..4370105 100644 --- a/src/app/Todo-List-App/containers/TodoList/todo-list.component.html +++ b/src/app/Todo-List-App/containers/TodoList/todo-list.component.html @@ -43,7 +43,7 @@
{{ remaining()}} uncompleted tasks
- +
You've selected an item
diff --git a/src/app/Todo-List-App/containers/TodoList/todo-list.component.ts b/src/app/Todo-List-App/containers/TodoList/todo-list.component.ts index b9e6773..2200dcc 100644 --- a/src/app/Todo-List-App/containers/TodoList/todo-list.component.ts +++ b/src/app/Todo-List-App/containers/TodoList/todo-list.component.ts @@ -123,10 +123,10 @@ export class TodoList{ clearCompleted(tasks: Tasks){ this.tasks = this.tasks.filter(task => !task.completed); - this.todoService.deleteTask(tasks) - .subscribe(data => this.tasks.filter(task => { - return task == data; - })) + // this.todoService.deleteTask(tasks) + // .subscribe(data => this.tasks.filter(task => { + // return task == data; + // })) } selectAll():void{