Created
November 24, 2014 18:03
-
-
Save linus-amg/1aefdae8ce288bb720f2 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
view = Marionette.ItemView.extend({ | |
initialize: function() { | |
this.listenTo(this.model, 'change:detail', this.calculateTotal); | |
this.listenTo(this.model, 'change:total', this.render); | |
}, | |
calculateTotal: function() { | |
var newTotal = calc(); | |
this.model.set('total', newTotal); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment