VOOZH about

URL: https://www.geeksforgeeks.org/javascript/backbone-js-url-collection/

⇱ Backbone.js url Collection - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Backbone.js url Collection

Last Updated : 25 Jul, 2022

The Backbone.js url Collection is the property or function of a collection which is the reference to the location where the data in the server is located. The url property of collection is used by all the models of collection to construct the url to fetch the data. 

Syntax: 

collection.url 
or
collection.url( ) ;

Properties: It doesn't take any arguments.

Example 1: In this example, we will illustrate the Backbone.js url collection. We will use url link to fetch the data for collection.

Output:

👁 Image
Backbone.js url Collection

Example 2: In this example, we will see url property of collection is used by all of its model as links for their own data.

Output:

👁 Image
Backbone.js url collection

Reference: https://backbonejs.org/#Collection-url

Comment