And then I do a delete $scope.markers.layerA, the data disappears from $scope.markers, as you would expect, but not from .getLayers() (as you would also expect).
Please take a look at test.html for a working example (sorry, I haven't got the hang of those code snippet websites). If you click on the "Dump markers" button, then on "Remove blue", then "Dump markers" again, this is what you get:
It appears that when using nested markers, the directive falls out of sync with the source markers object.
In other words, if I populate markers via:
And then I do a
delete $scope.markers.layerA
, the data disappears from $scope.markers, as you would expect, but not from .getLayers() (as you would also expect).Please take a look at test.html for a working example (sorry, I haven't got the hang of those code snippet websites). If you click on the "Dump markers" button, then on "Remove blue", then "Dump markers" again, this is what you get: