javascript - Backbone: What is the reason to have a model or other properties? -


i have problem backbone.js.

i have simple code :

var photoview = backbone.view.extend({     model: photo,     el: 'img',     photos: photocollection,     initialize: function () {      }, 

` model used in here ? coz if initialized call

var pview = new photoview({model:photo}); 

some how need pass photo object constructor of photoview. otherwise model property null, when tried use model property inside photoview functions.


Comments

Popular posts from this blog

css - I want to align grid in center -

python - SWIG function not printing output -

android - trying to open the sdcard's .txt file in my EditText -