summaryrefslogtreecommitdiff
path: root/client/js/services
diff options
context:
space:
mode:
authorroot <root@kabir-PC>2016-03-30 12:40:16 +0200
committerroot <root@kabir-PC>2016-03-30 12:40:16 +0200
commit750dcc61ceff516a9233cc10dc138a9c898a61f6 (patch)
treea90e51b9358db869fdefd0d111465799c945563f /client/js/services
parent804fa322d841d73ee7592885ec500dc94e91b9e6 (diff)
mettre les private pour la classe network coté serveur et mes premières essaie pour angularjs notamement extraction des donnée
Diffstat (limited to 'client/js/services')
-rw-r--r--client/js/services/Network.js27
-rw-r--r--client/js/services/Test.js8
2 files changed, 35 insertions, 0 deletions
diff --git a/client/js/services/Network.js b/client/js/services/Network.js
new file mode 100644
index 0000000..bd2a24f
--- /dev/null
+++ b/client/js/services/Network.js
@@ -0,0 +1,27 @@
+
+mainApp.factory('Network',[ '$http', 'Identity', function($http, Identity){
+
+ var data={};
+ data.networks=null;
+
+var ListId=function(fileToUpload, callback) {
+
+
+ var result=$http.post('../server/index.php',
+ $.param({"token" : Identity.getToken(), "task" : "network", 'action':'list_network_ids'}));
+
+ // Wait and handle the response
+ result.then(function (response){
+ callback(parseUploadImageAnswer(response, false));
+ },function(response){
+ callback(parseUploadImageAnswer(response, true));
+ });
+
+ console.log(result)
+
+ }
+
+
+}]);
+
+
diff --git a/client/js/services/Test.js b/client/js/services/Test.js
new file mode 100644
index 0000000..f12c6b9
--- /dev/null
+++ b/client/js/services/Test.js
@@ -0,0 +1,8 @@
+var app = angular.module('mainApp',[]);
+app.controller('hassan', function($scope,$http){
+ $http.get('http://127.0.0.1/database.json').success(function(response){
+ $scope.persons = response.records;
+});
+
+
+});