ng-inline-edit
![Coverage Status](https://camo.githubusercontent.com/39d98f7f452d406b66f9231062e6af805e4346db7851ee29e9a1f219d188213e/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f74616d6572617964696e2f6e672d696e6c696e652d656469742f6d61737465722e7376673f7374796c653d666c61742d737175617265)
Usage
Install ng-inline-edit via Bower:
bower install ng-inline-edit --production
Include main files:
<link rel="stylesheet" href="bower_components/ng-inline-edit/dist/ng-inline-edit.min.css">
<script src="bower_components/ng-inline-edit/dist/ng-inline-edit.min.js"></script>
Include angularInlineEdit
module as a dependency into your app:
angular
.module('yourApp', [
'angularInlineEdit'
]);
Pass your model to inline-edit
attribute on your HTML element and provide a callback function to listen changes:
<span inline-edit="yourModel"></span>
<!-- with optional attributes:
inline-edit-callback="yourListener(newValue)"
inline-edit-validation="yourValidator(enteredValue)"
inline-edit-placeholder="Type a value..."
inline-edit-filter="currency"
inline-edit-btn-edit="Click to edit"
inline-edit-btn-save="Save me"
inline-edit-btn-cancel="Nevermind"
inline-edit-on-blur="cancel" // 'cancel' or 'save'
inline-edit-on-click
inline-edit-textarea // uses <textarea> instead <input> & disables Enter key submit
-->
Development
See the instructions at ng-pack.