angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 729 forks source link

Uncaught SyntaxError #320

Open notreniev opened 9 years ago

notreniev commented 9 years ago

I'm getting message SyntaxError: Unexpected token <

Any idea ?

cndreiter commented 9 years ago

Most likely it has something to do with the contents of your data source. Did the server respond with HTML tags in the response body?

notreniev commented 9 years ago

I don't know if I have any control over the content of the data source. Here it is: $scope.eventSource = { googleCalendarApiKey: '', url: "https://www.google.com/calendar/feeds/brazilian__pt_br%40holiday.calendar.google.com/public/basic", //url: "http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic", className: 'gcal-event', // an option! currentTimezone: 'America/Chicago' // an option! };

cndreiter commented 9 years ago

I am new to ui-calendar, hence please take my suggestions with care.

You are passing an XML feed URL and the docs of http://fullcalendar.io do not say anything about XML reading-capability. However, they show you how you could define a reader function that processes XML: http://fullcalendar.io/docs/event_data/events_function

notreniev commented 9 years ago

I'm passing XML feed URL because this is in the ui-calendar default example. But I'll try your suggestion. Thanks!