How to use Angular-Xeditable's onBeforeSave / onAfterSave methods with more than $data as parameter
问题 When first using Angular-Xeditable with my application, I ran into a problem trying to figure out how to save an x-editable change to an object that was accessed through an ng-repeat loop. The documentation primarily focuses on using onbeforesave and onaftersave for validation, and while it does show that it can be used to save things, the examples don't show how to pass anything more than $data (or $index) to your onbeforesave/onaftersave method. The samples show saving something like $scope