0

problem

Assume I have a form with multiple inputs that bind to various properties of a view's data object. As I tab out ('blur') I want to persist that value to a save service and move on to the next field to edit. This save service returns the newly saved object in full. If I then write the updated object to the controller's data object, the current input that I am editing will lose changes.

question

Is there an built-in Angular solution using ngFormController that I am missing? Are there any libraries that support this without having a per-input type scenario?

I'm really hoping to avoid doing something like:

<input name="field1" save-on-blur="vc.save('field1')">

...and then having to diff the current view model against the incoming view model.

jusopi
  • 6,791
  • 2
  • 33
  • 44
  • I think you can use the validations directives.... have you tried this already? – Alvaro Silvino Feb 15 '16 at 22:49
  • These values do not require validation so we're not using them. Could you provide an example of how using them would help solve this problem? – jusopi Feb 15 '16 at 22:57

0 Answers0