Typescript (and now also ECMAScript 2017) gives you great asynchronous tools to use async / await. However, while working with Angular 4, I feel that using Observables is preferred. My question is: when I have a function that returns a single value once (for example: modal confirmation), are there big advantages when using observables or is it preferable to use promises (async / await) / as well? Isn't it strange to use observables? Do they represent a stream of values?
T; dg:
async showDialog(msg: string): Promise<DialogResult>
against.
showDialog(msg: string): Observable<DialogResult>
source
share