mvcNewbie
mvcNewbie

Reputation: 520

rxjs 6 "skip" operator missing

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!

Upvotes: 0

Views: 1083

Answers (2)

Nathaniel Hibbler
Nathaniel Hibbler

Reputation: 195

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();

Upvotes: 0

A T
A T

Reputation: 13836

.skip(1)

becomes:

.pipe(skip(1))

Upvotes: 2

Related Questions