Open logan-jobzmall opened 6 years ago
I think the issue here is that you are using vm.color
which isn't updated until you submit. If you are trying to change the color while the editable is open, try using $data
instead.
$data does get not populated unfortunately. I believe I saw another ticket around that...
Can you provide a plunkr or jsfiddle?
Hello,
When using an e-attribute (directive), I have a two way data binded value:
<span editable-text="vm.store.color" e-background-color="{{vm.color}}" e-ng-change="vm.changeColor($data)" e-colorpicker="hex" e-colorpicker-with-input="true" e-name="founded">{{ vm.store.color }}</span>
The
vm.changeColor()
will setvm.color
to whatever has changed on the colorpicker. I have a background-color directive I made that will set the background color to the color of any color you bind to it. Specifically,{{vm.color}}
doesn't seem to update the underlying input at runtime. Is there a way to two-way data bind to the child input when using e-attributes?Thanks!