0

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 iframe shows the Avalonia app.

Now I would like to implement some communication between the two. My goals are:

  1. Pass a variable value (string) from Angular to Avalonia, let's say it should be available once the Avalonia application is loaded.
  2. 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?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.