javascript - BackboneJS Reset Model -
javascript - BackboneJS Reset Model -
i have details view load dialog.
this dialog has form user can come in values (corresponding model attributes)
i pass model details view , set values in same model (on alter action of form fields)
now issue user can alter form fields (which updates model values) , click on cancel. want model go it's initial state when dialog loaded. (not default state)
how can handle ?
this best alternative previous values.
model.set(model.previousattributes()); javascript jquery backbone.js
Comments
Post a Comment