How to ng-repeat response data

How to ng-repeat response data

I have a simple piece of code that sends&nbsp;<em>data</em>&nbsp;to php for processing and then it returns it. I would like to ng-repeat that&nbsp;<em>data</em>&nbsp;in the page, I just can't tell what isn't right. I must point out to the fact that I am but a novice, therefore I might be overlooking something..

I have a simple piece of code that sends data to php for processing and then it returns it. I would like to ng-repeat that data in the page, I just can't tell what isn't right. I must point out to the fact that I am but a novice, therefore I might be overlooking something..

So I have this in the controller:

  $scope.one = function () {
  $http({
  method: "POST",
  url: 'destination.php',
  data: {'message' : something},
  })
  .then(function(response)
  {
  $scope.message = response.data.results;
  }
  )}

This is how the data goes to PHP and back from it:

$params = json_decode(file_get_contents('php://input'), true);
$outp = "";
if ($outp != "") {$outp .= ",";}
$outp .= '{"REZCMD":"'  . $params["message"] . '"}';
$outp ='{ "results":[ '.$outp.' ] }';
echo $outp;

example:

{ "results":[ {"REZCMD":"somethingprocessed"} ] }

And this is the HTML

  <div ng-repeat="x in message track by $index"></div>
   <li>{{message}}
   <li>{{x.REZCMD}}

Which prints this: (example)

*[{"REZCMD":"1003372"}]
*

EDIT

For this result:

{ "results":[ {"REZCMD":"1003372"} ] }

What I am expecting should look like this:

1003372

php json angular.js

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

PHP json_decode Example | Decode JSON Data in PHP Tutorial

PHP json_decode is an inbuilt function that takes the JSON encoded string and converts it into a PHP variable. JSON stands for JavaScript Object Notation.

Install Angular - Angular Environment Setup Process

Install Angular in easy step by step process. Firstly Install Node.js & npm, then Install Angular CLI, Create workspace and Deploy your App.

Convert PHP Object To JSON | PHP Array To JSON

Convert PHP Array to JSON. In this tutorial we’ll learn about the JSON format and how to convert PHP data structures into JSON. Convert PHP Object to JSON.