Skip to content

Instantly share code, notes, and snippets.

@svisamsetty
Last active December 29, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svisamsetty/7611753 to your computer and use it in GitHub Desktop.
Save svisamsetty/7611753 to your computer and use it in GitHub Desktop.
$scope.reset_messages();
$http.post('url').success(function(data){
$scope.status = data.status;
if (data.status) {
$scope.success_messages = data.success_messages;
}
else {
$scope.error_messages = data.error_messages;
}
}).error(function() {
$scope.error_messages.push("There was an error processing request. Please try again later");
$scope.status = false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment