blob: 7b658228a250329f84530e76fb084b007e0da86d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
import { Component, OnInit } from '@angular/core';
import { trigger, transition, style, animate } from '@angular/animations';
import { TodoItem } from '../todo-item';
import { TodoService } from '../todo-service/todo.service';
@Component({
selector: 'app-todo-page',
templateUrl: './todo-page.component.html',
styleUrls: ['./todo-page.component.css', '../todo-list-color-block.css'],
animations: [
trigger('itemEnter', [
transition(':enter', [
style({
transform: 'translateX(-100%) translateX(-20px)'
}),
animate('400ms ease-out', style({
transform: 'none'
}))
])
])
]
})
export class TodoPageComponent implements OnInit {
items: TodoItem[] = [];
isLoadCompleted = false;
constructor(private todoService: TodoService) {
}
ngOnInit() {
this.todoService.getWorkItemList().subscribe({
next: result => this.items.push(result),
complete: () => { this.isLoadCompleted = true; }
});
}
}
|