Bind an AngularJS directive to a mapping of an array
I have a directive that takes an array of objects. When declaring the
directive in markup, the scope has an array of objects that wrap the ones
needed by the directive. So I need to apply a map function on the array.
What's the right way to do this so updates made to the original array are
reflected inside the directive?
Here's a Plunker with a naive approach (which I was surprised to see
mostly "work" except for lots of $digest errors):
http://plnkr.co/edit/GUCZ3c
No comments:
Post a Comment