Answer the question
In order to leave comments, you need to log in
Why does pipe(share) pull the server twice?
My http service:
@Injectable({
providedIn: "root",
})
export class HttpService {
public blocks$: Observable<any>;
constructor(private http: HttpClient) {
this.blocks$ = this.http
.get()
.pipe(share());
}
}
forkJoin([this.httpService.blocks$]).subscribe(() => {})
*ngFor="let block of httpService.blocks$ | async"
Answer the question
In order to leave comments, you need to log in
And why do you subscribe in the component if you call it in the template via async?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question