Reputation: 685
I have all the HTML , JS code here on codepen : http://cdpn.io/nbuGB
I started learning marionette JS. Somehow this simple example is not working.
It throws error : Uncaught TypeError: undefined is not a function
how to resolve this ?
Upvotes: 0
Views: 112
Reputation: 752
Your problem is in these lines:
ContactManager.reqres.setHandler("contact:entities",function(){
return API.getContactEntities;
});
You need to write API.getContactEntities()
otherwise you're returning a function reference instead of your contacts collection. This causes the undefined error.
See: http://codepen.io/anon/pen/jALtq
Upvotes: 1