if (!$scope.control.value.datapoints) {
$scope.control.value.datapoints = angular.copy($scope.control.value);
for(var i = $scope.control.value.length -1; i >= 0 ; i--){
$scope.control.value.splice(i, 1);
}
}
Which when stepping through appears to have the expected result however on publishing the page and reloading all data is lost and the new array is empty?
Custom Grid Editor Model change without loss of data
I have a problem in that I have a Grid Editor that has data added and I need to change the model without losing the data.
Currently the value of
$scope.control.value
is an array of objects e.g....however I need to move all of the objects into a new a property so that my model is more like:
I've tried the following:
Which when stepping through appears to have the expected result however on publishing the page and reloading all data is lost and the new array is empty?
is working on a reply...