質問

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 ?

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top