I'm having problems updating the view after an Array
inside an Array
is updated in the $scope
.
First i check if the Array member already exists:
$scope.myArray = [];
if(typeof $scope.myArray[someIndex] == 'undefined') {
$scope.myArray[someIndex] = {
name: someName,
data: []
};
}
Then push to $scope.myArray[someIndex].data
:
$scope.myArray[someIndex].data.push(dataContent);
At this point the view does not update.
Of course if i directly push to $scope.myArray
it does. Any suggestions?
Edit: Fiddle here