I'm a beginner in Angular, so I ask for your patience. Currently, I am in the process of migrating an app from Asp.net MVC5 to Angular. One of the key functionalities of this application involves connecting to a third-party system by downloading a JavaScript file that establishes credentials and facilitates communication through an object. It appears that this object is immediately invoked function expression (IIFE), meaning it gets initialized as soon as the JavaScript file loads. To dynamically load the script in my component, I have successfully added it to the head of the document. However, my challenge lies in accessing that object within my component after the IIFE has executed. Despite verifying that the external file is being loaded and the object is initialized through browser developer tools, I am unable to find a solution because this JavaScript file cannot be obtained from npm or included in my assets folder.