-
Notifications
You must be signed in to change notification settings - Fork 2
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.
listen to incoming messages.
export class MyFormComponent implements FormComponent<any> {
constructor(private _snackbar: MatSnackBar) {}
onMessage(obj) {
this._snackbar.open('!');
}
}Moding Ltd.