Created
September 20, 2017 15:27
-
-
Save JuanjoSalvador/8a12801b5d254be3cb593338bd205b2d to your computer and use it in GitHub Desktop.
Example of $http usage in Angular 1.6
This file contains 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
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