In an ionic app, say I have several different pages. Let's say I make some database query in each of the different pages where I assign a class variable to the result of the db query. Like so:
bills: Observable<any[]>;
this.bills = db.list(this.constants.BILLS_ROOT_NODE, ref =>
ref.limitToFirst(25)).valueChanges();
Should I be unsubscribing or managing these subscriptions somehow? Does each subscription die once I navigate to a new page? What happens if two different pages end up requesting a similar node, should that be pulled out into a provider and then injected? Should all of my database calls be pulled out into a provider?