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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -