How to delay an observable in Angular 6 / Typescript
A more detailed example using HttpClient:
of(null).pipe(
delay(2000),
flatMap(() => {
return this.http.post<any>(url, params);
})
);
you can use delay function
public GetCurrentUserDelayedTest(): Observable<User>
{
return of(new User(""))
.pipe(delay(2000));
}