Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
2 answers
238 views

ng-if or ng-repeat in angularjs remove web-components from DOM

I have 14.2 angular and I need to reuse components from angular in the legacy project in angular js (1.8.3) using web components. I have two examples: https://stackblitz.com/edit/angularjs-with-...
Mykola Novytskyi's user avatar
0 votes
1 answer
45 views

Skip duplicated items while ng-repeat

There is a nested array which consist of bundles and those bundles in turn have items. So, I want to skip identical item(s) of the next bundle based on previous bundle items while iterating. Below is ...
bofanda's user avatar
  • 12k
0 votes
0 answers
741 views

Add font-awesome icon to one option in select created by an ng-repeat

Is it possible to add an icon to an option in a dropdown based on if it matches a certain setting from the data returned in an ng-repeat? I have the following select and the options within that ...
Blobula's user avatar
  • 181
0 votes
2 answers
2k views

Angular ng-repeat with ng-if not working on tr tag

In the below Div i am using ng-repeat across some data to populate a list. while doing this i would like to NOT have a a certain TR tag created if it fits a certain requirement by using the ng-if ...
Steve Short's user avatar
1 vote
0 answers
640 views

Again: ng-click not working inside ng-repeat inside ng-if

This is most likely going to be another Angular scope question. I looked hard for a solution on SO, however, nothing I found would solve my problem. I am using Angular.js together with Swiper.js. ...
kalabalik's user avatar
  • 3,832
-2 votes
2 answers
654 views

Want 6 radio buttons in two line with 3 in each line

I have 6 radio buttons. I want 3 on one line and other 3 on another line. I am using ng-repeat for retrieving radio button data from json. I tried putting ng-if for placing it for even and odd but its ...
dipesh's user avatar
  • 11
1 vote
1 answer
97 views

Order AngularJS directives are created not as I understand from the documentation

I have an AngularJS app where I have to traverse some of the elements with the cursor keys. To do this I created a directive called selectable that adds some info to a list in a service when the ...
Johann Weich's user avatar
0 votes
1 answer
117 views

Can ng-repeat take user defined $index increment in Angular Js?

Pure HTML: <div class="table-tr museo_sans500"> <div class="table-td"><a href="javascript:void(0)">fgfbgfbfg</a></div> <div class="table-td"><a href="...
Farjad Hasan's user avatar
  • 3,374
4 votes
2 answers
16k views

How to use ng-if with tr tag along with ng-repeat?

Can someone help me on this? Below is my code and the problem explanation. <table> <thead> <tr> <th>Icon</th> <th>Name</th> <th>...
Karthik's user avatar
  • 1,074
0 votes
2 answers
2k views

ng-if not working with ng-repeat

This should be a simple issue, but I don't understand what's happening. Basically I'm passing an object to a function call in my controller with ng-if withing an ng-repeat. However my function doesn'...
nima_santur's user avatar
0 votes
0 answers
103 views

I don't understand how ng-if work in a list

I don't understand how ng-if works: I would like that a button in a list is visible only if a condition is verified. In the example below, a button should only be visible if a list element has ...
Gyonder's user avatar
  • 3,756
0 votes
1 answer
259 views

AngularJS: ngIf and ngRepeat

I am using ngRepeat and ngIf to filter/sort(?) some data. I originally considered using ngSwitch instead of ngIf for this, but couldn't find a good example. After fumbling around with the slightly ...
UltraSonja's user avatar
1 vote
1 answer
1k views

How to change text in this case using ng-if or other expression?

I'm trying to change the text in a title tag based on a tag's direction value: <li ng-repeat="t in tags"> <div class="tag" ng-class="{'green-up': t.direction == 'positive', ...
Leon Gaban's user avatar
  • 39.4k
0 votes
1 answer
128 views

How to put $last ngRepeat result out of href?

Is there any option to put $last ng-repeat result like this <li class="active">Four</li> instead of <li><a href="#">Four</a></li> ? I have been trying with ng-if ...
Mo.'s user avatar
  • 27.6k
1 vote
1 answer
1k views

angularjs ng-repeat inside ng-if

angular js ng-if inside ng-repeat not working My angularjs ng-if code <div ng-controller="Ctrl"> <div ng-repeat = "data in categories"> <div ng-if="data.name == 'Sport' "> ...
Angu's user avatar
  • 872

15 30 50 per page