backbone.js - What do I get with the default Backbone.Model initialize function? -
For reference, I use coffeescript if I create a base model that provides backbone. Models and I create another class (ie App.Models.Project App.Models.Base) .. Everything works as expected. What if there will be a difference in the project example I wrote the base class:
start: - & gt; Super console.log 'hi' and just plain
start: - & gt; Console.log 'hi' Without spending too much time, it seems that an urgent object is required in both cases. I think that you always say 'super' but I do not know what I'm doing ..
< P> backbone , you can define an empty task initialize: function () {} this is up to your model to override. Generally, the model variables have been set here. Whenever you make a model object, the initial is called internally.
The same principle is fine when creating scenes and collections.
Comments
Post a Comment