diff options
author | 杨宇千 <crupest@outlook.com> | 2019-02-24 17:04:29 +0000 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-02-24 17:04:29 +0000 |
commit | cd28058f07fda57f6569316723f776f1b9b80e50 (patch) | |
tree | ac5133ecdb0c03c3b47885fd3fe8a2b590558316 /Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts | |
parent | 28aea0ced979675c19d78d9c38991580b20e931a (diff) | |
parent | 764c499add501af742b7098f4cc204feadbccda4 (diff) | |
download | timeline-cd28058f07fda57f6569316723f776f1b9b80e50.tar.gz timeline-cd28058f07fda57f6569316723f776f1b9b80e50.tar.bz2 timeline-cd28058f07fda57f6569316723f776f1b9b80e50.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.ts | 11 |
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() + ) ); }) ); |