Get /collection/id in backbone without loading the entire collection
问题 Is there a way to load a single entity of a Backbone collection (from the server)? Backbone.Collection.extend({ url: '/rest/product' }); The following code can load the entire collection with a collection.fetch() but how to load a single model? Backbone's documentation says clearly that GET can be done /collection[/id] but not how. 回答1: While we set url:"api/user" for the collection, the equivalent for the model is urlRoot:"api/user" this will make backbone automatically append the /id when