Skip to content

Instantly share code, notes, and snippets.

@marcusshepp
Created April 26, 2016 15:33
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 marcusshepp/204e11fb04194544f175bd256a58891f to your computer and use it in GitHub Desktop.
Save marcusshepp/204e11fb04194544f175bd256a58891f to your computer and use it in GitHub Desktop.
Angular: Making a GET request
var foo_app = angular.module("foo_app", []);
foo_app.controller("bar_controller", ["$scope", "$http",
function ($scope, $http){
$http({
method: "GET",
url: "api/foo/bar/",
}).then(
function successCallback(response){
console.log(response);
});
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment