TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
TaGi Asadullazadeh
NA
36
1.1k
Read specific columns from JSON with AngularJS
Apr 24 2018 4:00 AM
Hello guys..
What is the problem?
Html:
<!DOCTYPE html
>
<
html
ng-app
=
"App"
>
<
head
>
<
title
>
Angular
</
title
>
<
meta
charset
=
"UTF-8"
>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1.0"
>
<
meta
http-equiv
=
"X-UA-Compatible"
content
=
"ie=edge"
>
<
script
src
=
"https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"
>
</
script
>
<
link
rel
=
"stylesheet"
href
=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
>
<
script
src
=
"App.js"
>
</
script
>
</
head
>
<
body
ng-controller
=
"Controller"
>
<
div
class
=
"container"
>
<
table
class
=
"table"
>
<
tr
>
<
th
>
ID
</
th
>
<
th
>
Name
</
th
>
<
th
>
EMail
</
th
>
</
tr
>
<
tr
ng-repeat
=
"user in users"
>
<
td
>
{{user.id}}
</
td
>
<
td
>
{{user.name}}
</
td
>
<
td
>
{{user.email}}
</
td
>
</
tr
>
</
table
>
</
div
>
</
body
>
</
html
>
Js:
var
app = angular.module(
"App"
, []);
app.controller(
"Controller"
,
function
($scope, $http) {
var
url =
"https://jsonplaceholder.typicode.com/users"
;
$http.get(url).then(
function
(response) {
$scope.users = response;
});
});
Reply
Answers (
1
)
How to achieve autocomplete in angular 5 using type ahead
links for angular based interview questions