Just trying to understand why in this case I would need to use $scope.$apply ? According to all the info I've read about the subject, I shouldn't have to, since everything is happening inside Angular? What am I missing?
In my controller:
$scope.savePreset = function(columns, $event){
  $event.preventDefault();
  preset.name = prompt("Please enter preset name", "My Preset");
  if (preset.name != null) {
    preset.columns = $scope.columns;
    $scope.presets[preset.name] = preset; // (Object)
    // Without $scope.$apply() here, view isn't updated. Why?
    alert('Your preset "' + preset.name + '" has been saved.');
    $scope.loadPreset(preset.name);
  } else {
    alert('Please enter a valid name.');
  }
}
(the savePreset function is called in an ng-click directive, and there's an ng-repeat for preset in presets, which isn't updating).
Thanks, Pim
 
     
     
    