我使用的是Angular 8 DayPilot Scheduler,它能够在从链接重定向时很好地显示调度程序图表,但是如果直接输入URL或刷新当前调度程序页面,调度程序图表将消失并出现错误:
SchedulerComponent.html:1 ERROR Error: DayPilot.Scheduler: The placeholder element not found: 'dp_157775431314089808'.
at viewWrappedDebugError (core.js:19411)
at callWithDebugContext (core.js:30049)
at Object.debugCheckAndUpdateView [as checkAndUpdateView] (core.js:29741)
at ViewRef_.push../node_modules/@angular/core/fesm5/core.js.ViewRef_.detectChanges (core.js:20458)
at ApplicationRef.push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.tick (core.js:26837)
at core.js:26726
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
at Object.onInvoke (core.js:25986)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:390)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:150)
我的 SchedulerComponent.html 第 1 行:
<daypilot-scheduler [config]="config" [events]="events" #scheduler></daypilot-scheduler>