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
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
AngularJS ng-repeat inside ng-if
Nemilidinne Ashokreddy
Nov 25
2015
Code
6.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset=
"utf-8"
/>
<script src=
"Scripts/angular.js"
></script>
<script>
var app = angular.module(
'app'
, []);
app.controller(
"MyCtrl"
, function($scope)
{
$scope.selection =
{
ids:
{
"50d5ad"
:
true
}
};
$scope.categories = [
{
"name"
:
"Sport"
,
"id"
:
"50d5ad"
},
{
"name"
:
"General"
,
"id"
:
"678ffr"
}];
})
</script>
</head>
<body ng-app=
"app"
>
<div ng-controller=
"MyCtrl"
>
<div ng-repeat=
"data in categories"
>
<div ng-
if
=
"data.name == 'Sport' "
>
{{data.name}}
</div>
</div>
</div>
</body>
</html>
angularjs