| 42 | // onSave attribute -> onSave scope -> noop |
| 43 | var userOnSave = attrs.onSave ? makeFn('onSave') : ( scope.onSave || angular.noop ); |
| 44 | var onSave = function(result, status, headers, config) { |
| 45 | // Reset the original to help with reverting and pristine checks |
| 46 | original = result; |
| 47 | userOnSave(result, status, headers, config); |
| 48 | }; |
| 49 | // onRemove attribute -> onRemove scope -> onSave attribute -> onSave scope -> noop |
| 50 | var onRemove = attrs.onRemove ? makeFn('onRemove') : ( scope.onRemove || onSave ); |
| 51 | // onError attribute -> onError scope -> noop |