newbie in backbonejs here. was wondering if anyone can help me with the same issue. i tried the solution above and still no luck. i am having the same issue as this post Backbone.js - Getting JSON back from url.
here is my code
// Model for News Releases
var NewsItem = Backbone.Model.extend({
¦ defaults: {
¦ ¦ releaseID: 'no releaseID at the moment',
¦ ¦ date: 'no date at the moment',
¦ ¦ title: 'no title at the moment'
¦ }
});
// Collection for our Model
var NewsItems = Backbone.Collection.extend({
¦ model: NewsItem,
¦ url: url + "/thewheelsonthebus.php",
¦ parse: function(response) {
¦ ¦ console.log(response);
¦ ¦ return response;
¦ }
});
var e = new NewsItems();
e.fetch({
¦ success: function(collection, response) {
¦ ¦ console.log('this should return something on console' + response);
¦ }
});