Data transfer between pages and tabs page

Hello everyone I have an app which 's type is tabs and I want to set a number to tabs as tabBadge=5
I send the data at home.ts to badgeService.ts then What I want to do is get the number from doRefresh with badgeService to tabs.ts
but tabs.ts only runs once whenever the app starts.Theese are the images.Thank you
The tab.ts doesnt wait the tabSerivece.ts 's promises. output is comes from tabs.ts Tabs.ts promise then badge = undefined

maybe use providers as a data sharing class?

this is what i exactly done. I have an provider which name is badgeService.ts but at tabs.ts it only runs once

what do you mean? provider does run once, and then you have access to it

I want to take data whenever user runs the ion-refresh . but tabs.ts runs once. even tabs.ts cant the data from provider . it says undefined

i am trying really hard to understand you but i just dont, can you say something more? like what exactly you want to do?

Remove all instances of new Promise from your code, and then post it again as text, not images.

You need to use a Subscription instead of a Promise. A promise returns a value just once. Having the ability to subscribe to a stream of values will be helpful for your use case. Check the RXJS operators for implementing something like this