Angular 5 RxJs concatMap,switchMap,mergeMap which?
问题 I have this method to get token via localstorage, if token is not exist or is expired, I will call API to get another token and store to localstorage. In this case, which map should I use, currently using mergeMap, or other way to do this? public doGetToken():Observable<Token> { return this.loadToken().pipe( //get via localstorage map(token=>{ let valid = this.validateTokenIsValid(token); let data = { token: token, valid: valid }; return data; }), mergeMap(data=>{ if (!data.valid) { return