Explorar el Código

Implementing factory for getting github user data

David Leonard hace 10 años
padre
commit
587c58a1aa
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  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',
+            });
+        }
+    };
+});