|
Answer» AngularJS JSON Data we GET from service response is expected to be in JSON format. As JSON is a great way of transporting data and its quite easy to use them in AngularJS and as well as in JavaScript. We take a database example which have 7 records in JSON formats likes below.
 And all of data is wrapped in array which is called records.
 Above example have below details which will clarify you the details USED in above example (1)Above application defines myTestCtrl controller with a $scope and $http OBJECT. (2)$http is an XMLHttpRequest object for requesting external data. (3)$http.get() reads JSON data from Employees.php as DEFINE above (4)And on sucess controller will create myTestData in scope with JSON data from the server.
|