I believe my page has a wire loose.

The page has a TEXTAREA and I have entered 'aaa' in the TEXTAREA. The
TEXTAREA is bound to an ng-model of input. The AngularJS below is intended
to both monitor for changes from outside and with some granularity save
data to the server:

var UnixyTalk = angular.module('UnixyTalk',
[]);UnixyTalk.controller('OutputController', ['$scope','$http',
'$timeout', '$q',
   function($scope, $http, $timeout, $q)
        {
        var last_input = $scope.input;
        var repeatEr = function(data, status, headers, config)
            {
            var interval = !(config && config.time)? 1000 :
            (1000 - (config.time - (new Date()).getTime()));
            angular.extend($scope, data);
            console.log(data);
            $timeout(function()
                {
                $http.post('/ajax/listen',
                    {
                    'cache': false,
                    'params': {'conversation': 0},
                    'timeout': 1000,
                    }).success(repeatEr).error(repeatEr);
                $http.post('/ajax/say',
                    {
                    'conversation': 0,
                    'params': {'text': $scope.input, 'time': new
                      Date().getTime()}
                    });
                }, interval);
            }
        repeatEr();
        }
    ]);

And the server side is reporting that it is getting an empty POST
dictionary.

How should I be listing a dictionary if I want to post a QUERY_STRING's
key-value pairs (i.e. 'field1=value1&field2=value2' rather than a JSON
object)? Any other errors in this code?

-- 
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Christos Jonathan Seth Hayward, an Orthodox Christian author.

Amazon / Kindle <http://amazon.com/author/cjshayward> * *Author
<http://cjshayward.com/>* * Author Bio <http://jonathanscorner.com/author/>
 * *Email <[email protected]>* *
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 * Fan Page <http://fan.cjshayward.com/> * Google
Plus<http://jonathanscorner.com/plus>
 * LinkedIn <http://www.linkedin.com/in/jonathanhayward> * *Professional
<http://jonathanhayward.com/>* * Twitter<http://twitter.com/JonathansCorner>
 * *Web <http://jonathanscorner.com/>* * What's
New?<http://jonathanscorner.com/>
If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://www.amazon.com/dp/1478219912>*.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to