0

私はこのようなモデルとコレクションを作成しました:

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のようなパラメータをリクエストに追加する理由を知っている人はいますか?

4

1 に答える 1

1

試す:

testCollection.fetch({ cache: false });
于 2012-10-03T14:09:31.517 に答える