开发者

How to implement projects in Backbone.js TODOS-app?

Hey! I'm trying out Backbone.js and have followed the annotated source of the TODO's app.

I fail (don't know how this should be done) when trying to implement projects, which has tasks as "children". So th开发者_JS百科at i can change project and view different lists of tasks.

How should i do this? Some tips for beginner tutorials would also be great :)


The backbone docs mention a pattern for doing something like this:

http://documentcloud.github.com/backbone/#FAQ-nested

So, I would create a new model called a project that has a property called 'tasks' which is an instance of a TodoList collection.

I can't speak to storing the data, as I've never looked at the localStorage used in the TODO app.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜