バックボーン コレクションを使用してデータベースにクエリを実行する必要があります。これを行う方法がわかりません。どこかにURLを設定する必要があると思いますが、それがどこにあるのかわかりません。これは非常に基本的な質問に違いないことをお詫びしますが、CodeSchool.com でバックボーン コースを受講しましたが、どこから始めればよいかまだわかりません。
これは私がコレクション用に持っているコードです:
var NewCollection = Backbone.Collection.extend({
//INITIALIZE
initialize: function(){
_.bindAll(this);
// Bind global events
global_event_hub.bind('refresh_collection', this.on_request_refresh_collection);
}
// On refresh collection event
on_request_refresh_collection: function(query_args){
// This is where I am lost. I do not know how to take the "query_args"
// and use them to query the server and refresh the collection <------
}
})