Skip to content

Instantly share code, notes, and snippets.

@JuanjoSalvador
Created September 20, 2017 15:27
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 JuanjoSalvador/8a12801b5d254be3cb593338bd205b2d to your computer and use it in GitHub Desktop.
Save JuanjoSalvador/8a12801b5d254be3cb593338bd205b2d to your computer and use it in GitHub Desktop.
Example of $http usage in Angular 1.6
angular.module('ExampleModule', [])
.service('ExampleService', function($http) {
var base_url = "http://mywebservice.com/";
return {
this.get = function() {
return $http.get(base_url + "users");
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment