Hi,
jqxScheduler in Angular can sync with your backend API by listening to its events appointmentAdd, appointmentChange, appointmentDelete and then sending the updated data back to your server.
// Appointment added
onAppointmentAdd(event: any): void {
const appointment = event.args.appointment;
fetch('https://your-api.com/appointments', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(appointment)
});
}
// Appointment updated
onAppointmentChange(event: any): void {
const appointment = event.args.appointment;
fetch(<code>https://your-api.com/appointments/${appointment.id}</code>, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(appointment)
});
}
// Appointment deleted
onAppointmentDelete(event: any): void {
const appointment = event.args.appointment;
fetch(<code>https://your-api.com/appointments/${appointment.id}</code>, {
method: 'DELETE'
});
}
Best regards,
Peter Stoev
jQWidgets Team
https://www.jqwidgets.com/