Skip to content

Instantly share code, notes, and snippets.

@dspangen
Last active December 20, 2015 23:18
Show Gist options
  • Save dspangen/6211315 to your computer and use it in GitHub Desktop.
Save dspangen/6211315 to your computer and use it in GitHub Desktop.
var ViewModel = Backbone.Epoxy.Model.extend({
defaults: {
editorOpen: false,
editable: true,
required: false
},
computeds: {
deleteVisible: function() {
return !this.getBinding("editorOpen") &&
this.getBinding("editable") &&
!this.getBinding("required");
},
editVisible: function() {
return !this.getBinding("editorOpen") &&
this.getBinding("editable");
}
}
});
var inst = new EditorView({
model: model,
viewModel: new ViewModel()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment