How to Fetch data from an External JSON in AngularJS
In this Post We Will Explain About is How to Fetch data from an External JSON in AngularJS With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to How to Load and external json file in Angularjs Example
In this post we will show you Best way to implement javascript – Reading data from JSON file in Angularjs, hear for How to read JSON file data using AngularJS HTTP Get method with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.
How to Read Data from an External JSON file in AngularJS
Using simple data in simple JSON format is easy common in table web-applications and its simply and widely used in javascript frameworks AngularJS web-applications too.
JSON Data in a File
The simple file name is like as a live.json. We can make a simple JSON file using the here Notepad. Its simple or very best example.
[ { "ID": "001", "Name": "Karshan Pansuriya", "stype": "male" }, { "ID": "002", "Name": "Mahesh Rathod", "stype": "male" }, { "ID": "003", "Name": "Dipti Dhanani", "stype": "Female" }, { "ID": "004", "Name": " bhalodiya Sanjay", "stype": "male" }, { "ID": "005", "Name": "Manoj kothival", "stype": "male" }, { "ID": "006", "Name": "Parth radadiya", "stype": "male" }, { "ID": "007", "Name": "Ankit pipaliya", "stype": "male" }, { "ID": "008", "Name": "Jalapa patadiya", "stype": "Female" }, { "ID": "009", "Name": "Rupal Bapodariya", "stype": "Female" }, { "ID": "010", "Name": "Megha Pithadiya", "stype": "Female" } ]
Parse JSON file and Populate Data to a Table in AngularJS
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
<style>
table, th, td {
border:solid 1px #3D3D3D;
padding:3px;
font:15px Verdana;
text-align:center;
}
th {font-weight:bold;}
</style>
</head>
<body>
<div ng-app="liveApp"
ng-controller="liveCtrl">
<table>
<tr>
<th>ID</th>
<th>Stud Name</th>
<th>stype of Stud</th>
</tr>
<tr ng-repeat="stud in studentList">
<td>{{stud.ID}}</td>
<td>{{stud.Name}}</td>
<td>{{stud.stype}}</td>
</tr>
</table>
</div>
</body>
The Controller (Script)
<script>
var app = angular.module('liveApp', []);
app.controller('liveCtrl',
function ($scope, $http) {
//get json data
var request = {
method: 'get',
url: 'live.json',
datastype: 'json',
contentstype: "application/json"
};
$scope.datastud = new Array;
$http(request)
.success(function (jsonData) {
$scope.datastud = jsonData;
$scope.studentList = $scope.datastud;
})
.error(function () {
});
});
</script>
</html>
json Parse JSON file and Display Data with
and
- in AngularJS
<body>
<div ng-app="liveApp"
ng-controller="liveCtrl">
<ul ng-repeat="stud in studentList">
<li>{{ stud.ID + ' - ' + stud.Name + ' - ' + stud.stype }}</li>
</ul>
</div>
</body>
We will simple need to Create more or some CSS style to the
studentList.
<style>
ul
{
studentList-style:none;
font:15px verdana;
margin:1px 0;
padding:0;
}
</style>
You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example
I hope you have Got What is Fetching data from local JSON FIle in angularjs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I’m a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script> <style> table, th, td { border:solid 1px #3D3D3D; padding:3px; font:15px Verdana; text-align:center; } th {font-weight:bold;} </style> </head> <body> <div ng-app="liveApp" ng-controller="liveCtrl"> <table> <tr> <th>ID</th> <th>Stud Name</th> <th>stype of Stud</th> </tr> <tr ng-repeat="stud in studentList"> <td>{{stud.ID}}</td> <td>{{stud.Name}}</td> <td>{{stud.stype}}</td> </tr> </table> </div> </body>
The Controller (Script)
<script>
var app = angular.module('liveApp', []);
app.controller('liveCtrl',
function ($scope, $http) {
//get json data
var request = {
method: 'get',
url: 'live.json',
datastype: 'json',
contentstype: "application/json"
};
$scope.datastud = new Array;
$http(request)
.success(function (jsonData) {
$scope.datastud = jsonData;
$scope.studentList = $scope.datastud;
})
.error(function () {
});
});
</script>
</html>
json Parse JSON file and Display Data with
and
- in AngularJS
<body>
<div ng-app="liveApp"
ng-controller="liveCtrl">
<ul ng-repeat="stud in studentList">
<li>{{ stud.ID + ' - ' + stud.Name + ' - ' + stud.stype }}</li>
</ul>
</div>
</body>
We will simple need to Create more or some CSS style to the
studentList.
<style>
ul
{
studentList-style:none;
font:15px verdana;
margin:1px 0;
padding:0;
}
</style>
You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example
I hope you have Got What is Fetching data from local JSON FIle in angularjs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I’m a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.
<script> var app = angular.module('liveApp', []); app.controller('liveCtrl', function ($scope, $http) { //get json data var request = { method: 'get', url: 'live.json', datastype: 'json', contentstype: "application/json" }; $scope.datastud = new Array; $http(request) .success(function (jsonData) { $scope.datastud = jsonData; $scope.studentList = $scope.datastud; }) .error(function () { }); }); </script> </html>
json Parse JSON file and Display Data with
and
- in AngularJS
<body>
<div ng-app="liveApp"
ng-controller="liveCtrl">
<ul ng-repeat="stud in studentList">
<li>{{ stud.ID + ' - ' + stud.Name + ' - ' + stud.stype }}</li>
</ul>
</div>
</body>
We will simple need to Create more or some CSS style to the
studentList.
<style>
ul
{
studentList-style:none;
font:15px verdana;
margin:1px 0;
padding:0;
}
</style>
You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example
I hope you have Got What is Fetching data from local JSON FIle in angularjs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I’m a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.
<body>
<div ng-app="liveApp"
ng-controller="liveCtrl">
<ul ng-repeat="stud in studentList">
<li>{{ stud.ID + ' - ' + stud.Name + ' - ' + stud.stype }}</li>
</ul>
</div>
</body>
We will simple need to Create more or some CSS style to the
studentList.
<style>
ul
{
studentList-style:none;
font:15px verdana;
margin:1px 0;
padding:0;
}
</style>
You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example
I hope you have Got What is Fetching data from local JSON FIle in angularjs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I’m a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.
- studentList.
<style>
ul
{
studentList-style:none;
font:15px verdana;
margin:1px 0;
padding:0;
}
</style>
You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example
I hope you have Got What is Fetching data from local JSON FIle in angularjs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.
I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I’m a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.