aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-02-24 17:04:29 +0000
committer杨宇千 <crupest@outlook.com>2019-02-24 17:04:29 +0000
commit472cfcb7281cf8ee9dd3f22639c1370f99f7db16 (patch)
tree545c805dbd163da10845dfc352a4b3fe8e5ec01b /Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts
parent5e3896fee6b0d376cb7c3f1927596a8ed00e40e4 (diff)
parentad16dbe268984d639c4924fb8bb1e69e68c0fef7 (diff)
downloadtimeline-472cfcb7281cf8ee9dd3f22639c1370f99f7db16.tar.gz
timeline-472cfcb7281cf8ee9dd3f22639c1370f99f7db16.tar.bz2
timeline-472cfcb7281cf8ee9dd3f22639c1370f99f7db16.zip
Merged PR 9: Add entrance animation of todo item.
Add entrance animation of todo item. Related work items: #5
Diffstat (limited to 'Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts')
-rw-r--r--Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts b/Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts
index af3617fe..bfeb3285 100644
--- a/Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts
+++ b/Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
-import { Observable } from 'rxjs';
-import { switchMap, concatMap, map, toArray } from 'rxjs/operators';
+import { Observable, from } from 'rxjs';
+import { switchMap, concatMap, map } from 'rxjs/operators';
export interface AzureDevOpsAccessInfo {
username: string;
@@ -60,7 +60,7 @@ export class TodoListService {
.pipe(map(result => result.icon.url));
}
- getWorkItemList(): Observable<WorkItem[]> {
+ getWorkItemList(): Observable<WorkItem> {
return this.getAzureDevOpsAccessInfo().pipe(
switchMap(accessInfo => {
const baseUrl = `https://dev.azure.com/${accessInfo.organization}/${accessInfo.project}/`;
@@ -77,7 +77,7 @@ export class TodoListService {
{ headers: headers }
)
.pipe(
- switchMap(result => result.workItems),
+ concatMap(result => from(result.workItems)),
concatMap(result => this.client.get<WorkItemResult>(result.url, { headers: headers })),
concatMap(result =>
this.getItemIconUrl(baseUrl, headers, result.fields[TodoListService.typeFieldName]).pipe(
@@ -94,8 +94,7 @@ export class TodoListService {
}
)
)
- ),
- toArray()
+ )
);
})
);