Hi guys ,Please tell me why this code is not working.. Its jquery equivalent is working.//ng code... not working$http.post(url, data).success(function(data, status){alert("Status:"+status+" Data:"+data.message);}//jquery code ... this is working$.post(url, data, function(data, status){if(status == "success"){alert( "Data Saved: " + data.message );}Now, both codes hit the database... but the data values are empty in case of angular code.What am i doing wrong? i want to use angular all the way and i feel bad when i have to fallback to jquery for ajax stuff.Am using angular 1.0.0Josh.
--To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/x2YanXyKSd4J.
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
I am very happy to report that I finally got a jsFiddle working with the /echo/json/ api.A little jQuery param and a little JSON stringify does the trick.Thanks for the tip, Jeremy, that's probably the other half of my problem.Honey
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/LSkf_uHgVNAJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
I've been struggling for a while to make an $http.post work with my CodeIgniter PHP framework. Actually you can't access your data by reading $_POST or $_GET.
you need to go through "php://input", server-side.
This blog saved my day : http://www.cleverweb.nl/javascript/a-simple-search-with-angularjs-and-php/I hope it'll solve your problem,Jeremy
I've been struggling for a while to make an $http.post work with my CodeIgniter PHP framework. Actually you can't access your data by reading $_POST or $_GET.
you need to go through "php://input", server-side.
This blog saved my day : http://www.cleverweb.nl/javascript/a-simple-search-with-angularjs-and-php/I hope it'll solve your problem,
Jeremy
I've been struggling for a while to make an $http.post work with my CodeIgniter PHP framework. Actually you can't access your data by reading $_POST or $_GET.
you need to go through "php://input", server-side.
This blog saved my day : http://www.cleverweb.nl/javascript/a-simple-search-with-angularjs-and-php/I hope it'll solve your problem,
Jeremy