The `ngRepeat` directive instantiates a template once per item from a collection. Each template instance gets its own scope, where the given loop variable is set to the current collection item, and `$index` is set to the item index or key.

learn more… | top users | synonyms

0
votes
0answers
29 views

ng-repeat not rendering array changes in the controller

I have a list of items being displayed on a page using ng-repeat. Below is the html. <div class="container-fluid"> <div class="container" > <div class="page-header"> &...
267
votes
5answers
94k views

orderBy multiple fields in Angular

How to sort by using multiple fields at same time in angular? fist by group and then by sub-group for Example $scope.divisions = [{'group':1,'sub':1}, {'group':2,'sub':10}, {'group':1,'sub':2},{'...
0
votes
1answer
29 views

Angular ng-repeat html list not updating even though the actual array changes in the controller

I have a list of items being displayed on a page using ng-repeat. Below is the html. <div class="container-fluid"> <div class="container" > <div class="page-...
0
votes
2answers
34 views

Setting Angular variable in HTML whilst using ng-repeat

I have the following code which works great: <div class="progress progress-striped active"> <div class="progress-bar progress-bar-success" style="width: {{(p.availableIpAddressCount/...
0
votes
0answers
27 views

Ng-repeat datas from 2 json Angular

I try to get data from 2 jsons and list it in table : 1st 'names.json': [ { "name": "AAAAAA", "down": "False" }, { "name": "BBBBBB", ...
1
vote
2answers
22 views

Angular ng-class via ng-click inside ng-repeat

I have an ng-click function that is called on a button within an ng-repeat, but each time one of the buttons is clicked it causes the class to change on all the buttons. How can I fix my code to make ...
0
votes
6answers
54 views

How get data in controller of both ng-repeat field along with outside ng-repeat field

I am working on angular Project.I have two divs. In one div there is dynamic input which generating through ng-repeat. Initially, two input will be available but if the euser clicks on add more than ...
0
votes
4answers
27 views

ngRepeat Add to the current index

I have the following code, I want to add 1 to the current index of the second Name, because if I don't, it will output the same name in a single line. How do I add to the current index of ngRepeat? &...
3
votes
2answers
137 views

AngularJS ng-repeat not re-rendering the repeater (UI) and not invoking ng-init once again

I have a small doubt about ng-init, actually I have some charts. Trendline on top Piecharts below. HTML Table below. on page load I am not displaying anything, but once I click on particular button ...
0
votes
1answer
40 views

Smart-table search in table is not working

I try to display my data in a "smart-table", I use Restangular and data loaded to table very good, but search is not working(no data in table after query), Im new in angular(and in web too lol) and ...
13
votes
2answers
7k views

How can I pass an ng-repeated object to my AngularJS directive?

Take a look at my code here... Controller ("tasks" is an array of JSON objects resolved in my Routes.js): app.controller('testCtrl', function(tasks){ $scope.tasks = tasks.data; }; HTML: <...
0
votes
1answer
13 views

$index is tracking elements which are hidden by ng-if

<tr ng-repeat="materialOffer in Vm.materialoffers track by materialOffer.id" ng-if="!materialOffer.containMaterial && $index >= startIndex && $index < endIndex"> </...
0
votes
2answers
30 views

pass index of element clicked in ng repeat from one page to other

I'm trying to pass index of object by clicking from one page to other but it's not working. The page from index that need to be sent looks like this <div><table> <tr data-ng-...
0
votes
3answers
34 views

Change the background of a specific td row of a dynamic table using AngularJS

I have this dynamic table: <table id="thetable"> <tr> <th class="th2">&nbsp;&nbsp;Id&nbsp;&nbsp;</th> <th ...
0
votes
3answers
26 views

how to generate blank table rows before filling with ngrepeat

I am relatively new to JavaScript angular .module('MainView', ['Utils','ngMaterial']) .controller('MainCtrl', ['$scope','$timeout','$q','$log' ,function($scope,$timeout,$q,$log) { ...
0
votes
0answers
23 views

Angularjs array changes its syntax when it has only one record

I am using an angularjs array to store the record data(table rows) received by using the http.get rest API and printing using an ng-repeat. The problem is whenever there is only one record retrieved ...
-1
votes
0answers
29 views

usage of ng-repeat for special character

I am trying to get the data out of a list using ng-repeat. However my array on which I want to do ng-repeat has a special character (&) in its name. I tried to remove it using & it worked fine ...
0
votes
2answers
35 views

Hide and show ng-repeat in AngularJs

I have a dropdown and ng-repeat data. When the page loads, I want to hide the ng-repeat and based on selection of the dropdown data, i want to show the ng-repeat. The UI is as below: <div class="...
0
votes
0answers
10 views

angularjs ng-repeater column validation

In the attached image how can I validate the value entered in each row for the column ActualValue to be between the values in column Lower Spec and Higher Spec ?.
0
votes
2answers
23 views

angularjs ng-repeater dynamically delete data

I have a situation where users added sample data as shown in figure. How can I add Delete button which deletes particular sample ONLY. From figure , I want 'Delete Sample 1" to delete Sample 1 ...
9
votes
3answers
21k views

how to set dynamically height to element?

I am trying to set dynamically height to element in my demo .I will tell you issue I am taking static or constant value of height in my demo .I take 250px constant value #wrapper{ background-...
1
vote
1answer
38 views
0
votes
3answers
21 views

How to ng-if use when its value is “”?

How to use ng-if? I have below code. If image_path not null show td otherwise not. My code does not work. ng-if="hs.image_path != """ <td ng-if="hs.image_path != """><img id="...
0
votes
1answer
10 views

Using ng-repeat on iDangerous swiper slides

It seems to me that using ng-repeat on swiper slides disables the possibility to use slides within slides. See JsFiddle link. It contains 4 horisontal slides where slide 2 contains a vertical slide ...
0
votes
2answers
15 views

Providing action to only the clicked button in ng-repeat

I'm working with ng-repeat .In the ng-repeat i'm repeating panel.The panel body consist of two part .First part is a paragragh which i fetch from the database using $http.get(). In the second part i ...
0
votes
2answers
37 views

Alternative of ng-repeat in the AngularJS?

I have an array in which the thousands products and i have iterate the array with the help of the ng-repeat,it is working properly in browser,but in the mobile devices products are load really slow ...
1
vote
2answers
38 views

How to filter an array of objects based on an array of a specific object propert?

Here is a small example of my html using ng-repeat: <div ng-repeat="item in vm.templateList | filter: vm.myFilter"> <h3>{{item.Code}}</h3> </div> In Js file the vm....
0
votes
1answer
22 views

Best practice for displaying Firebase many-to-many relationships in the view (AngularFire)

I have found a lot of examples on how to structure many-to-many relationships in Firebase. Following the most recommended way I've seen to set it up I have some basic posts and tags data in Firebase: ...
0
votes
1answer
37 views

Is any alternatives of ng-repeat in Angular.?

I am working on a web-app, using Angular.js. I need to process huge data on many places. ng-repeat is taking too much time to process data i have thousand of data in my array, it's so time consuming ...
3
votes
4answers
39 views

Handling two rows in ng-repeat with same colour for n items

I have an array of objects which I need to show as list, required design is I tried the code below .odd{ background-color: grey; } .even{ background-color: #d09683; } <ion-...
0
votes
2answers
19 views

Nested array in drop down

New to angularjs so may it is a trivial thing but somehow cannot get hang of it.I have Array of object and in each object there is another array of object as filteredList=[{Company : "IBX", CEO : "...
0
votes
0answers
15 views

Retain scroll position for ng repeat with variable height data

We're creating chat in our project and get issue with messages loading when user scrolls top. We need create something like infinite scroll but when user scrolls top. The main issue we get is - when ...
1
vote
3answers
40 views

Show /hide warning messag based on filtered outputs ng-repeat

Please find the attached fiddle where I want to post a warning mesaage "No data to display" if the filter fais to match any results in the button clicks. Fiddle ng-repeat filter I have given ...
2
votes
1answer
40 views

Angular Form Validation inside ngRepeat

I have a series of table rows with various inputs inside of an ng-repeat and I'm trying to use angular's built in form validation to handle required fields. Everything works well except for when I ...
0
votes
2answers
26 views

Angular v1.4 repeat a div without re-rendering already rendered items

I wrote code to repeat an image array and a load more button to ajax request and push response images in that array. But every time new response comes then whole images reshuffled. <div class="...
2
votes
3answers
37 views

Angular ng-repeat empty option on select element causes error when leaving state

Im dynamically generating some options for a <select> element in angular.js using the ng-repeat directive. Im using ng-repeat rather than ng-options because this is for an empty form and I ...
1
vote
1answer
48 views

Angular directive ng-repeat and scope problemm

I have some troubles. In directive commentsFeedback in ng-repeat I'm showing some user comments. In form after click in response i get new object from server . I'm updating $scope.users[0].atrb to ...
0
votes
1answer
25 views

Multiple TinyMce not showing/Init right

Iam using TinyMce with the ui-tinymce Package. First I had multiple TinyMce generated through ng-repeat in a Table which worked fine. For Comparison now the ng-repeat generates a second TinyMce which ...
4
votes
3answers
23k views

Change background color with ng-Style

How can i change the background color with ng-style? this Div gonna repeat so the one of the color is from DB. For the plnkr i just fixed the colors, but in my example is like this: <div class="...
-4
votes
2answers
2k views

Angular to display last 12 months dates

I am trying to write simple ng-repeat that displays a list of the last 12 months, from today. So for example, if i load my application today (May 2014), i will have a list of: May 2014 Apr 2014 Mar ...
0
votes
1answer
13 views

ng-repeat orderby of dynamic lenght of object

I have the following object that contains 2 fixed attributes (OrderId and Purchasedate, and an array of attribues. I try to to put this in ng-repeat with orderBy option. The first 2 attribute (OrderId ...
3
votes
4answers
58 views

AngularJS ng-repeat not refreshing on array update

I have a problem where the ng-repeat aren't updating the list when the array change. I'm using a JavaScript promise to compute a calculation to then return an object containing 2 arrays. These arrays ...
0
votes
1answer
30 views

Angular ng-repeat list value spliting

I'm storing below data in localstorage and i wanted to retrieve these values in html page for search history(assume search history is an list). hotelSearchCriteria = { destination : location, ...
18
votes
5answers
30k views

Angular JS Date filter not working

I have an ng-repeat element which will loop through $http.get() result. <tr ng-repeat="blog in posts"> <td style="text-align:center">{{ $index+1 }}</td> <td>{{ blog....
1
vote
1answer
45 views

ng-repeat with two dimensional array

I have a array which is of the form $scope.vehPermitTypevalue = [ [ "NP","National Permit"], ["IND_AP","Andra Pradesh"]]; HTML CODE: <ui-select name="permit" id ="permit" multiple ng-model="...
1
vote
1answer
17 views

nested ng-repeat in angular js not showing anything

i am having this inside my controller method. var employee = [{name:"ankur",dept:"IT",company:"wipro",under:[{name1:"ashish"},{name1:"akash"},{name1:"tyagi"},{name1:"mogra"}]}]; $scope.employee = ...
1
vote
0answers
28 views

mess up with ng-repeat and ng-options?

This question may have already an answer. But I have seen so many users are posting questions regarding ng-repeat and ng-options as they are not able to achieve the desired solution. There are lot ...
0
votes
1answer
29 views

AngularJS - Callback For When a New Filter Has Been Applied to Ng-Repeat?

I have an ng-repeat element that looks something like: <div ng-repeat="message in messages | limitTo: customVariable"> where customVariable is constantly changed in my controller. Every time ...
38
votes
2answers
53k views

$first in ngRepeat

I have an array $scope.items. I want if the item is the $first one of the ngRepeat to add the css class in. Is it something that can be done with angular? Generally how can I handle the booleans in ...
2
votes
2answers
61 views

How to make an array of selected rows in ng-repeat?

I have a table in my Angular app. Each row of the table has a checkbox, I want to push all of selected rows in an array. Here is my HTML code: <table class="group-tbl"> <thead> <...