RXJS while loop for pagination
问题 I try to query all people data from the swap api. The URL swapi.co/api/people returns an object with an people array and the URL(swapi.co/api/people/?page=2) where I get the next data from. What I want to do is that the subscribe method updates the angular component every time a new page is available. I’m new to the reactive programming model. How can I implement a while loop or a sequence of Observables? This works for the first page: getAllPeople(): Observable<Person[]> { let nextUrl = http