Make class variables access from everywhere ionic 4

hi everyone i have ts class i want to call method inside it when the app still lunch where this method get data from server then sign it to variable where i can access it from any other ts class
regards safaa

Very importantly: you do NOT want to do what your topic headline says. You know that cliche about how secrets get exponentially harder to keep the more people know them? That is the rationale behind the criticism of global variables: it becomes extremely hard to evaluate what code is dependent on them and what code can affect them. Testing and maintenance become a nightmare.

What you probably want to do is to create a service provider that acquires, manages, and provides controlled access to a resource. I would suggest emulating the idioms in the Tour of Heroes part 4.