Thanks Rafael  for your reply. I think issue is in PHP file, but I cant
figure out it. I have to send value to PHP and then catch the value in JS
file which is returned by PHP file. I tried like below but


*PHP File*

$user=json_decode(file_get_contents('php://input'));

print $user['mail'];



*JS File*

*loginService.js*

'use strict';

app.factory('loginService',function($http)
{
   return {
       login:function(user)
       {
  var $promise=$http.post('data/user.php',user); //send data to user.php
  $promise.then(function(msg)
  {
     console.log(msg.data);
  });
       }
   }
});



I found nothing/empty/blank in console.





On Thu, Nov 26, 2015 at 6:42 PM, Rafael Bernard Rodrigues Araujo <
[email protected]> wrote:

> HI, Foysal.
>
> You need to retrieve the user object in the controller. See
> http://plnkr.co/edit/HGpQjNC7I945paFbWylw
>
> ===
> $scope.login = function(user) {
> ===
>
> Take care,
>
> --
> Rafael Bernard Rodrigues Araújo
> about.me/rafaelbernard
> Analista de Tecnologia | Hospedagem de sites - http://oservidor.com
>
> --
> 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.
>

-- 
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