Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Inplace Editor directive
<!--
PROBLEM: Inplace Editor directive has too many responsibilities.
-->
<inplace-editor
ined-type="select2"
ined-entity="workPackage"
ined-attribute="assignee"
ined-attribute-embedded="false">
</inplace-editor>
<!--
SOLUTION:
* create an inplace wrapper component, that transcludes component.
* for the frequent HTML/text-editing use-case, create a seperate component.
-->
<inplace-html-editor
ined-entity="workPackage"
ined-attribute="subject">
</inplace-editor>
<inplace-editor
ined-entity="workPackage"
ined-attribute="assignee"
ined-attribute-embedded="false">
<select ng-model="$inplace.value"
ng-options="item.href as item.title for item in $inplace.options">
</select>
</inplace-editor>
@0xF013

This comment has been minimized.

Copy link

0xF013 commented Dec 11, 2014

I'd rather create a separate component for each case like inplace-{{type}}-editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.