Created
October 22, 2014 02:46
-
-
Save ykhs/39048d0aff620ec328d4 to your computer and use it in GitHub Desktop.
JavaScript養成読本 特集1 第4章 リストA 訂正
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ContactView = Backbone.View.extend({ | |
template: '<div>Name: <%= firstName %> <%= lastName %></div>' + | |
'<div>Email: <%= email %></div>', | |
render: function() { | |
var compiled = _.template(this.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