Angular 1.0.1.
I'm trying to make a re-usable component directive using bi-directional binding using the
scope : { localVar : '
=boundAttribute' }
pattern
in a directive. When a local value changes, the scope.$watch listener
fires at the correct time with the correct newVal and I assign that
newVal to scope.localVar, hoping it will update the bound value in the
parent. But the parent scope applies after TWO changes to the local
scope. If I try to scope.$apply() in my listener function, the parent
scope updates immediately, but then I get a "$digest already in
progress" error.
A fiddle of a minimal example is here:
http://jsfiddle.net/HK84N/2/Thank you.
BTW - I love Angular and it's letting me quickly craft a rather large, robust intranet application!