Просмотр исходного кода

Implementing factory for getting github user data

David Leonard 10 лет назад
Родитель
Сommit
587c58a1aa
1 измененных файлов с 12 добавлено и 0 удалено
  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',
+            });
+        }
+    };
+});