Backbone.JS CID()

The Backbone.JS CID() model is used to uniquely identify the model on the client.

Syntax:

Model.CID  

Example:

 
   
  
 Client id Example  
  
  
  
  
  
  

Output:

Before setting unique identifier ID: undefined
Before setting unique identifier CID: c1
After setting unique identifier ID: 1
After setting unique identifier CID: c2

Explanation: CID is an automatically generated client ID by the Backbone.js, while ID is generated manually.

Please follow and like us:
Content Protection by DMCA.com