I'm trying to pass 2 models to the view, but it seems it is not working. Here is my example: http://jsfiddle.net/kahhor/jp4B6/14/ As you can see second alert is showing undefined...
May be I have wrong approach. What I'm trying to do is: in View1
bind event 'change'
to Model1
... Than by clicking button in View2
, call function in Model1
which changes value, and automatically render View1
, since it was binded to change event.
But don't forget that View2
has also its own Model2
, which I created outside the view and than passed it like new View2({model:Model2});
.
It might looked confusing at first, but I think it is simple thing that backbone can do. I just don't know how to do it :)
Thanks,