简体   繁体   English

Angular7 FullCalendar错误:无法读取未定义的属性“ length”

[英]Angular7 FullCalendar error: Cannot read property 'length' of undefined

I am trying out FullCalendar version 4.3 on a clean Angular 7.2.0 application. 我正在干净的Angular 7.2.0应用程序上试用FullCalendar 4.3版。 I am following this official guide . 我正在遵循这份官方指南 When I load a simple empty calendar, it works fine. 当我加载一个简单的空日历时,它可以正常工作。 As soon as I add any events AND the event should be displayed, it throws an error without displaying the event. 一旦添加任何事件并且应该显示该事件,它将引发错误而不显示该事件。

full calendar with events (copied from documentation): 具有事件的完整日历(从文档中复制):

<full-calendar
  defaultView="dayGridMonth"
  [plugins]="calendarPlugins"
  [weekends]="false"
  [events]="[
    { title: 'event 1', date: '2019-08-06' },
    { title: 'event 2', date: '2019-08-07' }
  ]"
></full-calendar>

Error: 错误:

ERROR TypeError: Cannot read property 'length' of undefined
    at DayGridView.push../node_modules/@fullcalendar/core/main.esm.js.View.computeEventDraggable (main.esm.js:7575)
    at DayGridEventRenderer.push../node_modules/@fullcalendar/daygrid/main.esm.js.SimpleDayGridEventRenderer.renderSegHtml (main.esm.js:218)
    at DayGridEventRenderer.push../node_modules/@fullcalendar/core/main.esm.js.FgEventRenderer.renderSegEls (main.esm.js:7799)
    at DayGridEventRenderer.push../node_modules/@fullcalendar/core/main.esm.js.FgEventRenderer.renderSegs (main.esm.js:7763)
    at DayGrid.res [as renderFgEvents] (main.esm.js:3183)
    at DayGrid.push../node_modules/@fullcalendar/daygrid/main.esm.js.DayGrid.render (main.esm.js:742)
    at DayGrid.push../node_modules/@fullcalendar/core/main.esm.js.Component.receiveProps (main.esm.js:3881)
    at SimpleDayGrid.push../node_modules/@fullcalendar/daygrid/main.esm.js.SimpleDayGrid.render (main.esm.js:1518)
    at SimpleDayGrid.push../node_modules/@fullcalendar/core/main.esm.js.Component.receiveProps (main.esm.js:3881)
    at DayGridView.push../node_modules/@fullcalendar/daygrid/main.esm.js.DayGridView.render (main.esm.js:1584)

I found this example angular project on github which works fine. 我在github上找到了这个示例角度项目 ,效果很好。 I recreated the project from scatch, updating the FullCalendar version to 4.3.0 (latest) without any problems. 我从scatch重新创建了项目,将FullCalendar版本更新为4.3.0(最新),没有任何问题。 I can't figure out what went wrong in the original app, however if anyone's having trouble getting it to work, the example project will help. 我无法弄清楚原始应用程序出了什么问题,但是,如果有人无法正常工作,则示例项目会有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Angular 4-无法读取未定义的属性“ length”中的错误 - Angular 4 - ERROR in Cannot read property 'length' of undefined IONIC 4 + Angular7:错误错误:未捕获(承诺):TypeError:无法读取未定义的属性“ then” - IONIC 4 + Angular7: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'then' of undefined 无法在ngOnInit()Angular7上读取未定义的属性“id” - Cannot read property 'id' of undefined on ngOnInit() Angular7 类型错误:无法读取未定义的 angular7 的属性“_id” - TypeError: Cannot read property '_id' of undefined angular7 如何修复angular7中的“无法读取未定义的属性”错误”? - How to fix 'Cannot read property 'errors' of undefined' in angular7? 错误类型错误:无法读取未定义 angular 8 的属性“长度” - ERROR TypeError: Cannot read property 'length' of undefined angular 8 Angular,FormGroup 上的错误,无法读取未定义的属性“长度” - Angular, Error on FormGroup, Cannot read property 'length' of undefined 错误TypeError:无法读取Angular 7 Drag and Drop中未定义的属性“length” - ERROR TypeError: Cannot read property 'length' of undefined in Angular 7 Drag and Drop 类型错误:无法读取角度 6 中未定义的属性“长度” - TypeError: Cannot read property 'length' of undefined in angular 6 TypeError无法读取未定义的属性“ length”-角度4 - TypeError cannot read property “length” of undefined - angular 4
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM