This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Allow binding to getter/setter fn #768
Closed
Description
Now, when we have "accessor" locals, one should be able to bind to accessor.
So either $parse or ng-model shoul handle it.
This is ugly - with binding to getter/setter, I wouldn't have to do the extra "value" and copying back and forward:
http://jsfiddle.net/vojtajina/XuhzP/64/
The tpl of the component would be just:
<span ng-hide="editMode" ng-click="editMode=true">{{model()}}</span>
<input type="text" ng-model="model" ng-show="editMode" ng-enter="editMode=false" />
Another ugly solution (taking advantage of obj reference from parent scope): http://jsfiddle.net/vojtajina/XuhzP/65/