I am working on an interesting project where I use a browser application to open my site "www.mysite.com" and inject there a string into a hidden <input>
element. The site is programmed in angular 6 and I would like to create a service that listens to the "onChange()" event of the input. I know it can be done easily by using @Input()
for example or anything like that but the difficulty here is that the data comes from a browser application that opens the page and injects the string into the <input>
element.
So if the <input>
element (or any other element with change detection) has the text stored inside it that comes from the extension I want to use a service to notify other components like a simple textarea inside a component to show the data. Basically I need a way to detect the change and via a service.
Thanks!