On Bidirectional Binding of Front-end Data

  node.js, question

Recently, I found a problem about two-way data binding in another project. I don’t know who has an elegant solution?

Description: modal pop-up box data binding. if the user does not save the data after editing, the modal box will be closed. data will be changed in front-end display due to bidirectional binding.

You can create a new TEMP object when you open the modal window. When saving, assign a value to the object to be bound. Destroy the TEMP object if you close it directly. The modal window also binds the TEMP object.