What role does pipe(take(1)) have when calling the method from authService?
this.authService
.signIn(email, password)
.pipe(take(1))
.subscribe(...)
take(1)
will unsubscribe after 1 value has been received. This is useful for tidying up subscriptions to long running observables when you know you only want the first result.
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