List is not being refreshed after navCtrl.pop()


#1

Hi there, I have a problem concerning page navigation.

I’m programming a journal and currently I have the problem, that when I edit an entry and overwrite the old one and navigate back to the page with a list of journal entries, the list is not being refreshed. It refreshes only if I go back one page more and reenter the page with the list of journal entries.

This is the save method of the journal entry page:

saveEntry():void{
console.log(“saveJournalEntry button was clicked”);
if(this.journalEntry.entryId==0 || this.journalEntry.entryId==null){
console.log(“saveEntry() -> entryId:” + this.journalEntry.entryId);
this.journalEntry.entryId = Number(new Date()); //.getTime);
}

  this.dbp.saveJournalEntry(this.journalEntry).then(val => {
    if(val)
      this.dbp.getJournalEntryCollection().then((val) =>{
        this.navCtrl.pop();
      });
  });
}

Does anyone know what’s the problem?

Thank you for your help.