Created
March 11, 2016 15:29
-
-
Save julesbou/89d401fecc3f2f12b31c to your computer and use it in GitHub Desktop.
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 View = Backbone.View.extend({ | |
tagName: 'div', | |
initialize: function() { | |
this.model.on('change:name', function(model, name) { | |
console.log('name is now: ' + name); | |
}); | |
}, | |
render: function() { | |
this.$el.html( | |
'<h1>'+this.model.get(‘name’)+'</h1>' + | |
'<a href=”#load/'+this.model.get('index')+1+'”>next</a>' | |
); | |
return this; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment