Fullcalendar赢得';t使用资源显示JSON对象
我正在使用fullcalendar,我想使用一个JSON文件来加载我的资源。JSON是返回对象的URL JSON文件:Fullcalendar赢得';t使用资源显示JSON对象,fullcalendar,Fullcalendar,我正在使用fullcalendar,我想使用一个JSON文件来加载我的资源。JSON是返回对象的URL JSON文件: [ {id: '001995',title: 'Victor'}, {id: '000078',title: 'Jhon'} ] 代码示例 resources: { url: '/resource-agenda/resource.json', type: 'POST'}, events
[
{id: '001995',title: 'Victor'},
{id: '000078',title: 'Jhon'}
]
代码示例
resources: {
url: '/resource-agenda/resource.json',
type: 'POST'},
events: '/resource-agenda/event.json'
我使用以下代码解决问题:
resources: { // you can also specify a plain string like 'json/resources.json'
url: 'resource-agenda/resource.json',
error: function() {
$('#script-warning').show();
}
},
events: { // you can also specify a plain string like 'json/events.json'
url: 'resource-agenda/event.json',
error: function() {
$('#script-warning').show();
}
}