I have a nested subscription which I believe is not good practice, and even though it usually works for me, in one instance it might causing me a problem.
How could I rewrite the following so it is not nested subscription?
this.pagesService.postReorderPages(ids).subscribe(res => {
if (res === "ok") {
console.log(res);
this.pagesService.getPages().subscribe(pages => {
this.pagesService.pagesBS.next(pages);
console.log(pages);
});
}
});