backbone-boilerplate

Backbone+Parse.com Collection.fetch() returns empty array using event callback

倖福魔咒の 提交于 2019-12-12 02:54:58
问题 i'm starting using parse.com to develop a web app but i'm stuck on a simple problem. I defined a model (or object in Parse SDK) as: Book.Model = Parse.Object.extend("book", { // Default attributes for the book. defaults: { title: "placeholder...", }, // Ensure that each book created has `title`. initialize: function() { if (!this.get("title")) { this.set({"title": this.defaults.title}); } }, }); and a collection: Book.List = Parse.Collection.extend({ // Reference to this collection's model.

Backbone Routes Not Being Called

自古美人都是妖i 提交于 2019-12-10 02:43:17
问题 I have a strange issue I haven't been able to figure out as of yet. It's very simple which is probably why I'm having trouble with it :) First, here's the routing table... routes: { '': 'root', //called 'report': 'report', // called 'report/add': 'reportAdd', // not called 'report/print': 'reportPrint', // not called 'report/settings': 'reportSettings', // not called }, You'll see I marked which ones are working and which ones aren't. The problem boils down to all subroutes (i.e report/add )

Backbone Routes Not Being Called

自作多情 提交于 2019-12-05 01:41:53
I have a strange issue I haven't been able to figure out as of yet. It's very simple which is probably why I'm having trouble with it :) First, here's the routing table... routes: { '': 'root', //called 'report': 'report', // called 'report/add': 'reportAdd', // not called 'report/print': 'reportPrint', // not called 'report/settings': 'reportSettings', // not called }, You'll see I marked which ones are working and which ones aren't. The problem boils down to all subroutes (i.e report/add ) not being matched. Backbone history is called properly in main.js like so: app.Router = new Router();