Skip to content

Instantly share code, notes, and snippets.

@guyjacks
Created May 10, 2017 04:33
Show Gist options
  • Save guyjacks/79e2c0b9228e5a03f65fb647d6267b8b to your computer and use it in GitHub Desktop.
Save guyjacks/79e2c0b9228e5a03f65fb647d6267b8b to your computer and use it in GitHub Desktop.
function reloadCases (afterLoad){
console.log('reloadCases()');
// Reload cases and executes the given afterLoad callback when done.
casesResource.query().$promise.then(function (someCases) {
console.log('reloadCases()', someCases);
ctrl.cases = someCases;
$timeout(updateCases, 100);
!!afterLoad ? afterLoad.call() : null;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment