I have a nested form array:
$scope.itinerary =
[
[
{name:'x'},
{name:'y'},
{name:'z'}
],
[
{name:'a'},
{name:'b'},
{name:'c'}
]
]
And I do $ watchCollection using the following:
$scope.$watchCollection(function () {
return $scope.itinerary;
},
function () {
console.log("Changed")
}
);
But it console.log()is executed only if one of the auxiliary arrays is deleted or a new array is added. If I move an element from one array to another, nothing will happen. (for example, when I move {name:'a'}from one array to another, nothing happens). How to set the clock to a nested array?
source
share