Advertisement
Guest User

Untitled

a guest
Aug 27th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $scope.moveObj = new apiSvc.move($scope.activeMove);
  2. $scope.moveObj.$save()
  3.   .then(
  4.     // success
  5.     function(response) {
  6.       $scope.msgObj = {"title": "Move", "detail": "Ticket accepted and processed", "severity": "success", "module":"move"};
  7.       $rootScope.$broadcast('notificationEvent',$scope.msgObj);
  8.       $scope.destroy();
  9.     },
  10.     // failure
  11.     function(response) {
  12.       $scope.msgObj = {"title": "Move", "detail": "Ticket rejected", "severity": "danger", "module":"move"};
  13.       $rootScope.$broadcast('notificationEvent',$scope.msgObj);
  14.       $scope.activeMove.errors = response.data;
  15.       $scope.persist();
  16.     }
  17.   );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement