Skip to content

ICallbackService

zehavibarak edited this page Oct 27, 2022 · 1 revision

Forward server message to form component.

public class MyForm : FormBase<MyModel> {
    private readonly ICallbackService _callback;
    public MyForm(ICallbackService callback) {
        _callback = callback;
    }
    private void ForwardMessage(object obj) {
        _callback.Trigger(obj);
    }
}

Use the Deliver method to forward message of any serializable type.

Web app

listen to incoming messages.

export class MyFormComponent implements FormComponent<any> {
    constructor(private _snackbar: MatSnackBar) {}
    onMessage(obj) {
        this._snackbar.open('!');
    }
}

Release Notes

Angular npm, Flutter pub.dev and Nuget packages.

Clone this wiki locally