How to access a function that is in another document typescript?


#1

I’m trying to access a function created in a typescript document and it does not respond, on the page with the component it responds perfectly.

There is how to create global functions to be accessed in any html?
How would it be?


#2

Can you elaborate a bit more on what you’re trying to achieve? Generally this sort of thing is handled by a service that is injected in pages that need it.


#3

Look for event subscription / publish


#4

Thank you, ozexpert, rapropos.
Subscription/publish - Ok.