私はdevextremeスケジューラを使用して予定スケジューラのアプリを作ろうとしています。 私は少しバグがあります。私は私が約束してドラッグを作成するときに、理由を知りたいと、私はちょうど作成予定をドロップし、私は私のコンソール上でこのエラーを持っているでしょう:devextremeスケジューラのプラグインのリフレッシュエラー - 角4
PUT http://localhost/v0/croissant/undefined 404 (Not Found)
appointment.service.ts:19 An error occurred Response {_body: "", status: 404, ok: false, statusText: "Not Found", headers: Headers…}
webpackJsonp.../../../../../src/app/services/appointment.service.ts.AppointmentService.handleError @ appointment.service.ts:19
ZoneDelegate.invoke @ zone.js:203
onInvoke @ core.es5.js:3890
ZoneDelegate.invoke @ zone.js:202
Zone.run @ zone.js:96
(anonymous) @ zone.js:462
ZoneDelegate.invokeTask @ zone.js:236
onInvokeTask @ core.es5.js:3881
ZoneDelegate.invokeTask @ zone.js:235
Zone.runTask @ zone.js:136
drainMicroTaskQueue @ zone.js:368
ZoneTask.invoke @ zone.js:308
core.es5.js:1020 ERROR Error: Uncaught (in promise): Response with status: 404 Not Found for URL: http://localhost/v0/croissant/undefined
しかし、私はページを更新し、その後、私は予定を移動すると、すべてのもの正常に動作します...ここここ
は私の更新予定の方法は、私のappointment.Service.tsである
updateAppointment(id: string, userId :string, timestamp :string, reason: string): Promise<Appointment>{
let bodySearchParam = new URLSearchParams();
bodySearchParam.append('userId', userId);
bodySearchParam.append('timestamp', this.datetotimestamp(timestamp).toString());
bodySearchParam.append('reason', reason);
let body = bodySearchParam.toString();
var AppointmentUrlUpdate = this.AppointmentUrlWrite + "/" + id;
return this.http.put(AppointmentUrlUpdate, body)
.toPromise()
.then(response =>
console.log("event updated")
)
.catch(this.handleError);
}
は私のカレンダーコンポーネント
の私なeventHandlerです私は<dx-scheduler
(onAppointmentUpdated)= "updateAppointment($event)"
>
</dx-scheduler>
私calendar.component.htmlに私なeventHandlerを呼び出すのはここ
とは、あなたの助けのための感謝!