I thought I was smart when I tried to load the first page of data and display it while loading the whole set in the background. I used the following code.
ngOnInit() {
this.service.getStuff(0, 10)
.subscribe(suc => this.subset = suc);
this.service.getStuff()
.subscribe(suc => this.data = suc);
}
Then, I set the breakpoint in my API fetching and releasing the first call and holding up unreleased the second. However, according to the network tab in my browser, both calls are pending until both are completed.
Am I anywhere close to have the pre-load working or is it far, far off?
The actual call is performed the usual HttpClient and a GET, returning an observable.