Skip to content

Instantly share code, notes, and snippets.

Created October 29, 2013 16:21
Show Gist options
  • Save anonymous/3d2d79d6ef2d87fae0fa to your computer and use it in GitHub Desktop.
Save anonymous/3d2d79d6ef2d87fae0fa to your computer and use it in GitHub Desktop.
.directive('editableField', function() {
return {
restrict: 'A',
replace: true,
template: '<div>' +
'<input ng-model="editableModel" />' +
'<div class="output">{{editableModel | editableFilter:editableFilter}}</div>' +
'</div>',
scope: {
editableModel: '=editableModel',
editableFilter: '=editableFilter'
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment