$result = mysql_query( "select * from chat");
$data = array();
while ($row = mysql_fetch_assoc($result)) {
$data[] = $row;
}
echo json_encode($data);
// your service javascript
this.request("chat.php", params, function (res) {
var result = JSON.parse(JSON.stringify(res));
});
Thank’s for help, I’ve found my pb…
the controller refresh the view BEFORE the service has done the $http…
that was my pb, I’ve solved with a resolve in my app.js