Sorry if this is an obvious question. I am following this tutorial: https://blog.angular-university.io/angular-jwt-authentication/
And i created the Service like in the tutorial but it tells me that Property '.shareReplay' does not exist on type 'Observable', I supose my imports are not correct, but I cant seem to find the correct ones.
import {Injectable} from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {User} from "./model/user";
@Injectable({
providedIn: 'root'
})
export class AuthenticationService {
constructor(private http: HttpClient) {
}
login(username: string, password: string){
return this.http.post<User>('/login', {username, password})
.shareReplay();
}
}