我的問題是從集合中刪除的模式,是有辦法來檢測得到了從集合中刪除時,我們綁定/聽集合的add事件模型。 爲前: this.listenTo(monthsOnBoardCollection, "remove", function(){
//is it possible here to find what got removed from the collection ?
}
我想了解如何在模型中添加結構集合。我的簡單應用程序有團隊(所以團隊模型和團隊集合),每個團隊都有一堆玩家(玩家模型和玩家集合)。所以,它的視覺結構,像這樣: Team A
- Player 1
- Player 2
- Player 3
Team B
- Player 1
- Player 2
等等... 如何將一個結構,這樣的骨幹應用程序?
我有一個非常簡單的模型,名爲「gameModel」,下面顯示了一個集合「gamesCollection」。當我嘗試在集合中創建新遊戲時,它會向服務器發送帖子,但該帖子中沒有數據。有沒有人知道發生了什麼事? //The relevant code
var game = new gameModel();
game.gameId = id;
gamesCollection.create(game)