I have 3 subscriptions I need to subscribe to. But when I run it, only 1 or 2 of them fire out of 3. I even tried swapping the order of the subscriptions and the last one still doesn't get fired. I also tried running these in the constructor of my angular component and in ngOnInit(). I get the same response.
Attempt 1:
this.n.authorizations.subscribe(x => {
alert("1"); // ✅
this.n.pages.subscribe(y => {
alert("2"); // ❌
this.n.user.subscribe(user => {
alert("3"); // ❌
});
});
});
Attempt 2:
this.n.pages.subscribe(y => {
alert("1"); // ✅
this.n.authorizations.subscribe(x => {
alert("2"); // ✅
this.n.user.subscribe(user => {
alert("3"); // ❌
});
});
});
Attempt 3:
this.n.user.subscribe(user => {
alert("1"); // ✅
this.n.authorizations.subscribe(x => {
alert("2"); // ✅
this.n.pages.subscribe(y => {
alert("3"); // ❌
});
});
});
I do have the code for these services, but they're long and complicated. Probably not related to the problem.