I load an AngularJS page by calling this method below in my Java class, just an example. If I have an object, e.g Person, how to send that to the Angular page?
public void init() {
Person p = this.person; //This is just an example of the object I send
final JFXPanel fxPanel = new JFXPanel();
fxPanel.setLayout(new BorderLayout(2,2));
fxPanel.setSize(new Dimension(1000, 1000));
fxPanel.setVisible(true);
Platform.runLater(() -> {
WebView webView = new WebView();
webView.getEngine().load("http://localhost:4200");
webView.setVisible(true);
fxPanel.setScene(new Scene(webView));
});
add(fxPanel);
}