My PHP page, submit.php
, is designed to take the "data" parameter as either get
or post
, and save it into a local file. I have confirmed its functionality by testing it with jQuery's $.ajax
method. Now, however, I need to integrate AngularJS into my application. When attempting to use the following code snippet:
$http.post("submit.php", {"data": "foobar"});
Nothing occurs; the output file remains unchanged. What could be causing this issue? How should I correctly send the post request using AngularJS? The Chrome console displays that the post request has been made with the specified data, yet the file remains unaffected. Strangely enough,
$.post('submit.php', {'data': 'barfoo'});
works flawlessly.