diff options
author | crupest <crupest@outlook.com> | 2019-02-25 00:40:27 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-02-25 00:40:27 +0800 |
commit | 764c499add501af742b7098f4cc204feadbccda4 (patch) | |
tree | ac5133ecdb0c03c3b47885fd3fe8a2b590558316 /Timeline/ClientApp/src/app/todo-list-page/todo-list.service.ts | |
parent | 28aea0ced979675c19d78d9c38991580b20e931a (diff) | |
download | timeline-764c499add501af742b7098f4cc204feadbccda4.tar.gz timeline-764c499add501af742b7098f4cc204feadbccda4.tar.bz2 timeline-764c499add501af742b7098f4cc204feadbccda4.zip |
Add entrance animation of todo item.
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() + ) ); }) ); |