javascript - Load JSON into backbone model -


I am trying to load json files in a backbone model:

  var feed = backbone.model Extension (); Var FeedCollection = Backbone.Collection.extend ({Model: Feed, url: 'feed.json' var feeds = new FeedCollection (); feeds.fetch ({Success: Work} {console.log (feeds);}})   

The first log gives the JSON obect inside the file, just gives an object without JSN data.

You are overriding the parsing function and are not returning anything to add itself to the collection. parse Permission to populate it from Feedback

Alternatively, return the parse to the properties you need from the server's response to define your collection.



Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -