I am trying to upgrade my project based on some template from angular 5 to 6
one of the method return mergeMap in this way
return this.accountEndpoint.getUserByUserNameEndpoint<User>(userOrUserId.userName)
.mergeMap(user => this.deleteUser(user.id));
and some other in this way return
this.accountEndpoint.getDeleteUserEndpoint<User>(<string>userOrUserId)
.do(data => this.onRolesUserCountChanged(data.roles));
unfortunately mergeMap and do does not exists on observable in rxjs 6
Couuld give me a hint how should this be mapped in new worlds of rxjs 6 ?
The do
operator was renamed to tap, but mergeMap still exists in RxJs 6:
import { tap, mergeMap } from 'rxjs/operators'
sourceObservable.pipe(
tap(e => ...),
mergeMap(e => ...)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With