How Can You Track Any Change in Model Attribute Value?


Please explain why do you think this question should be reported?

Report Cancel

All attributes of a model can have listeners bound to them to detect changes to their values. In our initialize function, we are going to bind a function call everytime we change the value of our attribute. In this case, if the name of our “person” changes, we will alert their new name. Syntax for attaching callback to change event of attribute is this.on(“change”, function(model){})

Please follow and like us:

About the Author