Skip to content

Instantly share code, notes, and snippets.

@ykhs
Last active March 9, 2017 03:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ykhs/04e772788e17b46a1411 to your computer and use it in GitHub Desktop.
Save ykhs/04e772788e17b46a1411 to your computer and use it in GitHub Desktop.
JavaScript養成読本 特集1 第6章 リスト8 訂正
// js/note_list_item.js
App.NoteListItemView = Backbone.View.extend({
tagName: 'tr',
render: function() {
var template = $('#noteListItemView-template').html();
var compiled = _.template(template);
var html = compiled(this.model.toJSON());
this.$el.html(html);
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment