0

I've upgraded to Angular/Rxjs 6 and I've noticed that the "skip" operator on Observable is no longer there. I've not been able to find a suitable substitute, does anyone have any suggestions? Thanks!

mvcNewbie
  • 520
  • 1
  • 11
  • 23

2 Answers2

2
.skip(1)

becomes:

.pipe(skip(1))
A T
  • 13,008
  • 21
  • 97
  • 158
0

Make sure you have correct imports and then wrap your .skip with a .pipe( , , ,)

import { Observable, of, throwError } from 'rxjs';
import { map, filter, scan, skip } from 'rxjs/operators';

  .pipe(
    filter(() => this.registrationForm.valid),
    map((registrationForm: any) => { // Form to-> ViewModel
      this.registrationVm.username = registrationForm.username;
      this.registrationVm.password = registrationForm.password;
      this.registrationVm.passwordConfirm = registrationForm.passwordConfirm;
    })
  )
  .subscribe();