Here. In that case, instead of passing from
a Promise
, we’re passing it an array, which makes for a longer-lived Observable
that keeps emitting until it’s finished all of the items in the array. Note the first operator is a switchMap
because we only have one array, but after we’ve spread the array out we need to mergeMap
the process that fetches each subrequest, otherwise we’d only fetch the first element.