I'm completely new to webdev and i need to use AngularJS. I really have troubles with using $http.post.
app.controller('searchCtrl', function($scope, $http, $log) {
$scope.search = function() {
$http.post('server.php', { "data" : $scope.keywords})
.success(function(data, status) {
$scope.result = data;
})
};
I use this controller (and it works fine), but i would like to pass a second parameter (a string) to server.php
, in addition to $scope.keywords
.
How do i do that, both on server and client side ?