Created
June 5, 2013 20:45
-
-
Save morsdyce/5717178 to your computer and use it in GitHub Desktop.
Usage of requestHandler #gisto #angular #website_embed
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
'use strict'; | |
function exampleController($scope, requestHandler) { | |
// notifications are enabled by default, if you do not wish the notification | |
// to show provide the stopNotification property with the value true | |
requestHandler({ | |
method: 'GET', | |
url: 'http://localhost/api/gist/1', | |
// stopNotification: true // will stop the notification from being displayed. | |
}).success(function(data, status, headers, config) { | |
console.log(data, status, headers, config); | |
}).error(function(data, status, headers, config) { | |
console.log(data, status, headers, config); | |
}); | |
/* | |
* You may also use the shortcut methods such as: | |
* requestHandler.get, requestHandler.post, requestHandler.put, | |
* requestHandler.delete, requestHandler.head, requestHandler.jsonp | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment