How do I fetch a single model in Backbone?

前端 未结 7 1094
误落风尘
误落风尘 2020-11-30 18:36

I have a Clock model in Backbone:

var Clock = Backbone.Model.extend({});

I\'m trying to get an instance of that that has the l

相关标签:
7条回答
  • 2020-11-30 19:18

    ...and do this if you don't want the trailing slash on the model urlRoot:

        url : function() {                        
            return this.urlRoot + this.id;
        },
    
    0 讨论(0)
提交回复
热议问题