Answer the question
In order to leave comments, you need to log in
How to hide/skip an element in ng-repeat output?
Good afternoon!
I just started learning Angular, everything is fine, but I ran into a problem.
JSON:
[
{
"id":"3",
"name":"Главная страница",
"key":"glavnaya_stranica"
},
{
"id":"4",
"name":"Блог",
"key":"blog"
}
]
<ul class="float-right">
<li ng-repeat="item in list"><a href="#/{{item.key}}" id="menuItem">{{item.name}}</a></li>
</ul>
<ul class="float-right">
<li><a href="#/glavnaya_stranica" id="menuItem">Главная страница</a></li>
<li><a href="#/blog" id="menuItem">Блог</a></li>
</ul>
Answer the question
In order to leave comments, you need to log in
<ul class="float-right">
<li ng-if="item.id != 3" ng-repeat="item in list"><a href="#/{{item.key}}" id="menuItem">{{item.name}}</a></li>
</ul>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question