mirror of
https://github.com/wassname/HackFlowy.git
synced 2026-06-28 16:10:05 +08:00
Add Backbone models, collection, views
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
var app = app || {};
|
||||
|
||||
(function() {
|
||||
|
||||
app.TaskView = Backbone.View.extend({
|
||||
|
||||
tagName: 'li',
|
||||
template: $('#taskTemplate').html(),
|
||||
|
||||
render: function() {
|
||||
var tmpl = _.template(this.template);
|
||||
this.$el.html(tmpl(this.model.toJSON()));
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}());
|
||||
Reference in New Issue
Block a user