瀏覽代碼

Implemented factory for getting top contributed data from Django JSON Response

David Leonard 10 年之前
父節點
當前提交
b751c37a60
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      angular/scripts/factories/githubTopContributionsFactory.js

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

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