推薦網址:http://davidsulc.com/blog/2012/04/22/a-simple-backbone-marionette-tutorial-part-2/Backbone.Marionette和Event Aggregator
我很天真地進入骨幹和事件聚合器。你能否讓我知道使用下面這行代碼的理由。
this.model.addVote(); MyApp.vent.trigger(「rank:down」,this.model);
似乎有些其他的可能性是
this.model.addVote(); this.model(rankDown);
或其他方式 MyApp.vent.trigger( 「addVote」,this.model
請解釋一下感謝
運行示例:http://jsfiddle.net/Irfanmunir/966pG/29/
第一個鏈接是相同的第二..也許只是刪除引用舊帖子? – ErichBSchulz
該鏈接無法打開,因此我從google緩存創建了一個要點:https://gist.github.com/andreif/6018972 – Andrei