我正在为 Arshaw FullCalendar
使用 AngularJS
指令。问题是 $scope.eventSource
中的 className
没有出现在 event object
上,我的代码是:
$scope.eventSource = {
url: "/unavailability/getCalData?userId=" + CurrentUser.user().id,// add source of working api
className: 'performer-unavailability', // an option! -> Not Working
currentTimezone: 'America/Chicago' // an option!
};
但是当我在事件数组中从后端发送 className
时它工作正常,className
附加到事件。我不想在后端解析一大堆数组来添加 className
,请提出任何解决方案。
最佳答案
事件对象是如何在后端构建的,url是等价的吗?如果事件源缺少标题或开始标记,选项可能不起作用。
Event Objects can have "options" associated with them. However, before you can start specifying options, you must write an Event Object in its extended form. It must be a traditional JavaScript object with properties. Here are the extended forms for each type of Event Source: http://fullcalendar.io/docs/event_data/Event_Source_Object/
关于javascript - 在 `$scope.eventSource` 上,属性 `className` 不相加 - 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34492381/