I am still learning backbone and building my first app at the same time, so any help to get the ball rolling again would be awesome.
First, all i am trying to do it is get the proper response from the backbone. I am 100% sure that the server is sending me pure JSON, as I can check it in the browser via a URL. Same url as the urlRoot
in my code, its just saved in a var.
I had this kind of working before but i was getting a JSON response through a collection(it look okay), which i later found was not the best, and I would rather get data through models. But I can not seem to get the same return from the server using models.
Here is my code: Model:
var CalendarDay = Backbone.Model.extend({
urlRoot: daysURL
});
var calendarItem = new CalendarDay();
Shouldn't I just be able to do this console.log(calendarItem.fetch())
and get the correct JSON response?
This is what my console shows:
What i want is the "responseText" potion only...
This also means that using calendarItem.get(*****)
doesnt work.
Any ideas ladies/gents?