Excuse me for asking what may seem like a basic question. I'm currently following a tutorial at this link:
I have created the Service as shown in the tutorial, but I am getting an error that says Property '.shareReplay' does not exist on type 'Observable'. I suspect that my imports are incorrect, but I'm struggling to identify the right 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();
}
}