Event listen globally for instant update

I have many pages in my app, I have one common value for entire app {{itemcount}} I am using localstorage to save this value, so whenever I want to update this value I update local storage value and it’s get update, I have create on function on my homepage and calling from constructor:

listenToMyVal() {
    this.events.subscribe('myval:itemcount', () => {
      this.storage.get('itemcount').then((value) => {
        this.itemcount = value;

It’s working on my homepage, is there any common way so my itemcount value will update from any page.

you can use this.events.publish from any page to post an event and subscribe will pick changes.

hi nylex,
I had already used this.storage.set('itemcount',this.itemcount); but when I click on Back button on previous page still old value being display.