4

Trying to upgrade from angular 5.2 to angular 6.0.0, we are running into the following error:

error TS2339: Property 'do' does not exist on type 'Observable<

Any ideas why?

The Code where we are using is

return this.httpClient.post<x>(`${environment.apiUrl}auth/x/`,
  this.abcd,
  httpOptions)
  .do(x1 => this.subject.next(x1))
HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
kanchirk
  • 912
  • 2
  • 13
  • 29

1 Answers1

4

Chain operators were deprecated a while back and now they're removed. Use pipeable operators, in this case tap replaces do.

import { tap } from 'rxjs/operators';

return this.httpClient.post(ˋ${environment.apiUrl}auth/x/ˋ, this.abcd, httpOptions)
.pipe(
    tap(x1 => this.subject.next(x1))
);
funkizer
  • 4,626
  • 1
  • 18
  • 20