title: I cannot retrieve json data from php with Angular $http.get
body: <p>This my php code</p>
  
  <pre><code>    &lt;?php
  
  
  try {
      $dbcon=new PDO('mysql:host=localhost;dbname=angular;charset=utf8',"root","");
  
      $dbcon-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
      $dbcon-&gt;setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'");
      $query="SELECT * FROM products ";
      $sql=$dbcon-&gt;prepare($query);
      $sql-&gt;execute();
      $result=$sql-&gt;fetchAll(PDO::FETCH_OBJ);
  
      $json_result=json_encode($result);
  
      echo $json_result;
  
  }catch(PDOException $e) {
      echo 'ERROR: ' . $e-&gt;getMessage();
  }
  
  
  ?&gt;
  </code></pre>
  
  <p>and this my controller to angular</p>
  
  <pre><code>  function ProductListCtrl($http)
  {
  
      $http.get('api/products.php').success(function (data) { alert(data); this.product = data; });
  
  }
  </code></pre>
  
  <p>the alert message is [object Object,...] ,how can i retrieve the json data from php?</p>