Backbone.JS ChangedAttributes()

The Backbone.JS ChangedAttributes() model is used to get the model’s attributes that have changed since the last set and becomes false if there are no attributes.

Syntax:

Model.ChangedAttributes (attributes)   

Parameters: attributes: This parameter is used to specify the properties of a model.

Example:

  

  
Example  
  
  
  
  
  
  
  
  

Output:

Changed attributes: {"sub":"Just another Example.","msg":"Hello World."}

Explanation: In the above example, the attributes ‘msg’ and ‘sub’ of a model X has changed.

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