I'm learning the Avalonia framework and my goal was to embed it into an existing Angular application. To accomplish this, I used an iframe and passed the source to index.html generated by dotnet publish command, it worked just as expected.
The Avalonia application I created is a simple 5 question quiz and my Angular application has 2 routes:
- setup parameters view: A text input assigned to a global service variable,
- wasm view: A route where
iframeshows the Avalonia app.
Now I would like to implement some communication between the two. My goals are:
- Pass a variable value (string) from Angular to Avalonia, let's say it should be available once the Avalonia application is loaded.
- Emit a message/event from Avalonia to Angular.
I'm thinking about window.postMessage() method or creating a custom Event, but how do I use it in Avalonia?