Home / Web Development / Angular Js / AngularJS – Reading JSON data

AngularJS – Reading JSON data

Hi Friends
AngularJS service provide read the data from remote servers using $http. $http.get(url) is the function to use for reading server data.
eg:
<script>
var app = angular.module(‘myApp’, []);
app.controller(‘customersCtrl’, function($scope, $http) {
$http.get(“http://www.prittytimes.com/angular/customers.php”)
.success(function (response) {$scope.names = response.records;});
});
</script>

AngularJS is quickly becoming the dominant JavaScript framework for professional web development.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Media Auto Publish Powered By : XYZScripts.com