It is based on ideas of x-editable but was written from scratch to use power of angular and support complex forms / editable grids.
To make element editable via textbox just add
editable-text="model.field"
attribute.
To create editable select (dropdown) just set
editable-select
attribute pointing to model.
To pass dropdown options you should define
e-ng-options
attribute
that works like normal angular
ng-options
but is transfered to underlying
<select>
from original element.
To load select options from remote url you should define
onshow
attribute pointing to scope function.
The result of function should be a $http promise, it allows to disable element while loading.
To make element editable via textarea just add
editable-textarea
attribute
pointing to model in scope. You can also wrap content into
<pre>
tags to keep linebreaks.
Data can be submitted by Ctrl + Enter.
To make element editable via checkbox just add
editable-checkbox
attribute
pointing to model in scope. Set
e-title
attribute to define text shown with checkbox.
To create list of checkboxes use
editable-checklist
attribute pointing to model.
Also you should define
e-ng-options
attribute to set value and display items.
To create list of radios use
editable-radiolist
attribute pointing to model.
Also you should define
e-ng-options
attribute to set value and display items.
By default, radioboxes aligned horizontally.
Validation is performed via
onbeforesave
attribute pointing to validation method.
Value is available as
$data
parameter. If method returns string - validation failed
and string shown as error message.
To hide Ok and Cancel buttons you may set
buttons="no"
attribute.
New value will be saved automatically after change.
Just define
e-multiple
attribute that will be transfered to select as
multiple
.