Created
June 27, 2012 10:57
-
-
Save kazu69/3003319 to your computer and use it in GitHub Desktop.
Backviewでもdefault値を設定する例
This file contains hidden or 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 baseView = Backbone.View.extend({ | |
defaults: { | |
defaulsVal: 'this is defaults' | |
}, | |
initialize: function () { | |
_.defaults(this, this.defaults); | |
}, | |
render: function () { | |
console.log(this.defaulsVal); | |
} | |
}); | |
var view = new baseView(); | |
view.render(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment