あんぎゅらーJSことはじめ。 2014/01/14

Angular.jsをつかいはじめてみました。
よくわからないことばかりです。

まずは、postで値を送信する部分

$scope.hebon = function() { $http({ method : 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, url : 'http://deijitools.appspot.com/api/tohebon', data : 'text=' + $scope.itxt }).success(function(data, status, headers, config) { $scope.otxt = data; }).error(function(data, status, headers, config) { $scope.otxt = 'error'; }); }



つぎにサーブレットで、POSTで、値を取得する部分
String text = ((String[]) req.getParameterMap().get("text"))[0];

いまいちこの辺の連携がわかってないんだよねー。

: