How the external js, in angular4 interacts with the data in the component bidirectionally

1. First of all, the business goes something like this. Now we need to write some function libraries for others to use, and the back end can send this script string to our front-end angular program through a http request. We parse these scripts and execute the related logic
2. Secondly, the scripts called by others contain some code that controls the user"s logic, which is also implemented by our function library, but the scripts they write are to manipulate a presentation of the front end, so it is possible to pass the data in the component to the called external js, so that the function can execute
3. So what we need to do now is to know how to make the data in the angular component available for global js calls, and after the global processing of a data, we can also update the information in the component to affect the page
4. The third point is the key point, if there is a clear god, please give a clear way, thank you!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e55dab-45367.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e55dab-45367.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?