I have a parent and child application built in angular. In the child application I’m exposing a method on the window object. The child application main.js is loaded inside the parent application (script). However, inside the parent, the window object doesn’t have the method exposed in the child.
Asked
Active
Viewed 60 times
2
-
How exactly are you injecting your "child" application in your "parent" application? Are you using iFrames? If yes, it's not easily possible and definitely a bad habit to share data between different (basically) browser windows. – Fabian Strathaus Oct 19 '22 at 08:47
-
@FabianStrathaus I’m not using iFrames. I’m simply adding the minified js file of the child to the scripts of the parent. And the child is correctly getting loaded as well (as I can see in the sources). – Swathykrishna K Chandran Oct 19 '22 at 13:17
-
maybe you should add the code parts where you load the child components for us to understand what exactly you are trying to achieve. – Fabian Strathaus Oct 19 '22 at 13:27