Carlos Cifuentes
AngularJS library migration · inline editing

Migrating angular-xeditable to modern Angular

angular-xeditable turned text into click-to-edit fields (text, select, date, textarea) with save and cancel buttons, including editable rows and forms. It is tied to AngularJS.

What replaces it

OptionWhen to choose it
Your own inline-edit componentA view mode and an edit mode over a reactive form control; small and reusable.
AG Grid cell editingWhen inline editing happens inside tables or grids.

How to migrate it

  1. List the editable types in use and the hooks attached to them (onbeforesave, onaftersave).
  2. Build one inline-edit component with display and edit templates, Enter to save and Escape to cancel.
  3. Move the save hooks to a service call that returns an observable, and show server validation errors inside the editor.

Watch out. onbeforesave could reject a value by returning a string, which was shown as the error message. Recreate that flow explicitly: keep the editor open, show the error and restore the old value on cancel.

Other libraries

Planning a migration or a micro-frontend platform?

In a 20-minute call you describe your situation and I tell you how I'd approach it. If it isn't worth doing yet, I'll say so.

Message me on LinkedIn