Created
July 31, 2013 11:58
-
-
Save davidpp/6121370 to your computer and use it in GitHub Desktop.
Example of a restangular POST not returning a response object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Restangular.all('devices').post(device_to_activate).then(function(response) { | |
| $log.info("Device activated", response); | |
| alert("Error " + response.status + ", " + response.data); | |
| }, function(response) { | |
| alert("Error " + response.status + ", " + response.data.message); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment