Within my Ionic application, I have implemented 2 tabs named applied
and rejected
. Upon initially visiting the appliedPage
, a method within the constructor is triggered and successfully displays the desired output, much like the RejectedPage
. However, upon proceeding to a third page and taking action by either applying or rejecting, the modifications do not carry over to either the AppliedPage
or RejectedPage
. Specifically, after clicking on apply or reject, returning to the respective applied
or rejected
page does not invoke the Http
in the constructor. Ideally, each time a particular page is accessed, it should automatically trigger a specific method responsible for fetching data from the DB
using http
. How can this be achieved?
constructor(public navCtrl: NavController, public navParams: NavParams,
private getAppliedlist: ActionsProvider)
{
console.log('fetching data`);
this.getAppliedlist.getAppliedList().subscribe((data: any) => {
this.applied = data;
console.log(this.applied);
})
}
The code snippet above pertains to the AppliedPage
.