Skip to content

Instantly share code, notes, and snippets.

@oliverm2112
Last active December 16, 2015 09:39
Show Gist options
  • Save oliverm2112/5414768 to your computer and use it in GitHub Desktop.
Save oliverm2112/5414768 to your computer and use it in GitHub Desktop.
In the controller
$scope.$emit('post.test', {method : 'getUser', userid:'myid', password:'mypw'}); // cache:false
$scope.$on('post.success', function () {
console.log('POST OK.');
});
$scope.$on('post.error', function () {
console.log('POST fail server!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment