Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
myMusic = {};
myMusic.Song = Backbone.Model.extend({});
myMusic.SongView = Backbone.View.extend({
tagName: "li",
className: "item",
template: Handlebars.compile($("#song-template").html()),
initialize: function () {
render: function(){
//var song = this.model;
//var cancion = song.get("cancion");
//var autor = song.get("autor");
var html = this.template(this.model.toJSON());
return this;
var song = new myMusic.Song({ cancion: "Always", autor: "Blink 182" });
var songView = new myMusic.SongView({ model: song });
window.myMusic = myMusic;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.