私はこのようなモデルとコレクションを作成しました:
var TestModel = Backbone.Model.extend({
initialize: function () {
},
defaults: {
'id': null,
'title': '',
'description': ''
}
});
TestCollection = Backbone.Collection.extend({
model: TestModel,
url: function () {
return 'Test/GetAll';
},
});
次に、次のようにロードしようとするビューがあります。
var testCollection = new TestCollection();
var testListView = new TestListView({ collection: testCollection });
testCollection.fetch();
ただし、次のようなリクエストが作成
Test/GetAll?_=1349272902901
されます。これは失敗します。このidのようなパラメータをリクエストに追加する理由を知っている人はいますか?