This demonstrates using cross-document messaging to communicate between an Angular app and two React apps embedded inside it using iframes. The Angular app was created using the Angular CLI. The React app was created using create-react-app.
To run this:
-
open a terminal
-
cd child-app (hosts a React app)
-
npm install
-
npm run start
-
close the browser window that opens to localhost:3000
-
open a terminal
-
cd parent-app (hosts an Angular app)
-
npm install
-
npm run start
-
browse localhost:4200