Pārlūkot izejas kodu

Implementing factory for getting github user data

David Leonard 10 gadi atpakaļ
vecāks
revīzija
587c58a1aa
1 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  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',
+            });
+        }
+    };
+});