Sfoglia il codice sorgente

Implementing factory for getting github user data

David Leonard 10 anni fa
parent
commit
587c58a1aa
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12 0
      angular/scripts/factories/githubUserFactory.js

+ 12 - 0
angular/scripts/factories/githubUserFactory.js

@@ -0,0 +1,12 @@
+'use strict';
+
+restApp.factory('githubUser', function($http) {
+    return {
+        get: function() {
+            return $http({
+                url: 'http://127.0.0.1:8000/hackathon/githubUser/',
+                method: 'GET',
+            });
+        }
+    };
+});