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
1answer
28 views

push checked checkbox value with multiple ng-model

I have days option for user. My expected output will be, when a user click submit if monday and tuesday is selected it should be [1,2] if weekdays is selected it should be string 'weekdays' I have ...
0
votes
1answer
24 views

Default selected option doesn't work in angularjs

I have a view <select ng-model="selected_student" class="form-control"> <option ng-repeat="obj in students" value="{{obj.id}}">{{obj.name}}</option> </select> I am doing ...
2
votes
1answer
1k views

AngularJS - pass parameter from ng-repeat to controller from custom directive

I have a custom AngularJS directive, which is rendering a ng-repeat. In this ng-repeat I want to pass one element to a function. The function is called, but item is undefined. Important: I get my ...
0
votes
2answers
27 views

ngif with a form inside a ng-repeat

I use a ngRepeat directive to show data of persons (now I am showing only the name of the persons). The name of the person is shown using a span tag. Also there is a button that hide the span and ...
0
votes
0answers
20 views

Bootstrap validator with textarea in ng-repeat

I have a textarea inside a ng-repeat. I am trying to validate using the Bootstrap validator, but the validation is not working. <div ng-repeat="Descriptions in testWithDescription "> <...
0
votes
2answers
38 views

How to get id in dropdown and also set default value on top

I have the code below and I want card_id but it shows null. How can I get the id and is_default card on top? when I use ng-click, it shows the result below. I want to get the selected card_id. <...
0
votes
3answers
44 views

Understanding ng-repeat for array of Objects

I have the following array of objects, which is a server response. I am trying to use ng-repeat to iterate over this array and read each value. While trying to use in html, array[0].value is working ...
1
vote
5answers
43 views

Ng repeat not working in kenwheeler - Angular Js

Hi I am using kenwheeler slick carousel but when I use ng-repeat on the div i get `listed images'. What I a doing wrong here ? <section class="regular slider" style="clear: both" ng-if="slides"&...
0
votes
2answers
23 views

How to sort by descending datetime ng-repeat in Angularjs?

I want to sort my data by descending date, ie 27, 26 , 25 .... How to do this? <tbody class="gradeX" ng-repeat="x in Profile | orderBy: x.created_datetime"> <tr> <td>{{x....
0
votes
2answers
56 views

Why does ng-repeat return only one object from my MongoDB results?

In trying to answer this question, I decided to break down the problem into something simpler. Problem: If I use ng-repeat to create rows for every element in "test", I instead get one row with one ...
3
votes
1answer
50 views

Angular js order by ID when ID is a string and not an INT

I am using angular, and I have a list of elements which I'd like to render dynamically. I have three buttons, and each button calls the same function with a parameter. This parament is the order I ...
14
votes
5answers
14k views

Dynamic form name attribute <input type=“text” name=“{{ variable-name }}” /> in Angularjs

How would someone use formName.inputName.$valid when the "inputName" was dynamically created? <form name="formName"> <input ng-repeat="(variable) in variables" type="text" ...
9
votes
5answers
11k views

Angular ng-repeat with nested json objects?

I have a JSON object, represented as such: { "orders" : [ { "ordernum" : "PRAAA000000177800601", "buyer" : "Donna Heywood" "parcels" : [ { "upid" : "...
0
votes
1answer
47 views

Unable to inject items into a function using ng-repeat

<div class='basket__center_item' ng-repeat="item in baskeItems" > <img class='basket__center_foto' src="img/{{item.foto}}" /> <h4 class='basket__center_name' > {{item.name}}&...
0
votes
1answer
28 views

Display data with an AngularJS ng-repeat, in a div, side by side

I have an arraylist from which I need to get values where isActive = true, and to display the data in a <div> tag with the use of ng-repeat. My problem is that I don't want to keep using ng-...
0
votes
2answers
18 views

view pending status data in table by default

<select class="form-control" id="selectrequest" ng-model="selectedrequest"> <option value="pending" > Pending </option> <option ...
3
votes
1answer
24 views

AngularJS - Can't sorted DateTime with ngRepeat orderBy

After reading a tons of post on SO (post1, post2, post3 ...) and googling, I can't still figure out how to sort the datetimes inside my ng-repeat. Here is what I've done : The ng-repeat inside my ...
1
vote
0answers
72 views

print each row of a list separately in ng-repeat

I have a list of data in ng-repeat where i want to print each row in ng-repeat table. here is my code <tr ng-repeat="prescription in patientPrescriptionList"> <...
0
votes
6answers
24 views

Why data is not getting displayed in the frontend table structure?

Below is a sample json data getting from a service request. { "sunday": [ { "endTime": "08:50 AM", "startTime": "08:00 AM", "duration": "50", "period": "A" }, ...
-1
votes
5answers
31 views

how to show default dropdown value show top angularjs

I have a dropdown show below card information and i want to show is_default= true card show top other cards below.. please help me <select ng-model="approvedinvoicesCtrl.currentcard.card_id"> ...
1
vote
2answers
53 views

moving one array into other array for handling ng-repeat

var res = { "response": { "data": { "profilesearchsnippet": [ [ { "profileInfo": { ...
1
vote
6answers
42 views

Get image from array AngularJS

Get a response from server. Understand how to display all data, but haven't idea, how to show images. "body": [ { "id": 18, "student_id": 2, "content": [ { "...
26
votes
4answers
42k views

how to use animation with ng-repeat in angularjs

I have a list which I iterate over by using ng-repeat: and the user can interact with thte list items by using up-arrow and down-arrow icons and on click of them i simply change the order of the ...
1
vote
2answers
46 views

need to display deeper item in ng-repeat AngularJs

Get an object from server. look like this: "courses": [ { "id": 1, "name": "piano", "classes": [ { "id": 1, "name": "piano1", ...
9
votes
2answers
20k 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-...
0
votes
1answer
7k views

Angular: Error: [$parse:syntax] Syntax Error

I want to create tooltips in a ng-repeat with angular-tooltips. The content of the tooltips has to be dynamically. What I already have is something like this: View: <div ng-repeat="region in ...
2
votes
4answers
47 views

Angular - loop over nested javascript arrays

How can I use ng-repeat to loop over data that contains many nested array data? I have data that will have many "Segments" Example: confirm.booking.flightData[0].Segments[0].FlightNumber ...
2
votes
2answers
28 views

Angular 1.x ng-repeat shows data while straight template binding doesn't display

This ng-repeat shows me data but not {{ ...}} ng-repeat WORKS <div ng-repeat="x in confirm.booking.flightData"> {{x.DestinationAirport}} </div> Template Binding DOES NOT WORK {{...
0
votes
4answers
43 views

handling two ng-repeat in same table

I have a list of images saved in var images, and a list of names saved in var searchName, now I need to display images along with name, but I could display it after all images displayed only. HTML: &...
46
votes
8answers
68k views

AngularJS sorting rows by table header

I have four table headers: $scope.headers = ["Header1", "Header2", "Header3", "Header4"]; And I want to be able to sort my table by clicking on the header. So if my table looks like this H1 | H2 | ...
-1
votes
1answer
21 views

handling images in ng-repeat

I have a array with image source. I need to show this images in ng-repeat. I am not able to fetch need assistance. var images = ["http://35.154/media?request={"request":{"service":{"servicetype":"6","...
324
votes
9answers
181k views

AngularJS ng-repeat handle empty list case

I thought this would be a very common thing, but I couldn't find how to handle it in AngularJS. Let's say I have a list of events and want to output them with AngularJS, then that's pretty easy: <...
2
votes
2answers
1k views

AngularJS ng-repeat grid of two divs per row

I want to load data from an array and display two divs per row. Eg: say there are 8 objects. I want them to appear in four rows of two 1 2 3 4 5 6 7 8 Code: <div ng-repeat="accObj in ...
3
votes
4answers
53 views

Issue with ng-repeat

var responsePromisecom = $http.get("restapi calling"); responsePromisecom.success(function(data) { console.log(data); $scope.items=data.platform.record; }); ...
3
votes
2answers
36 views

Angular repeat, break across columns

I'm doing a multi-checkbox form where I have as many as 100 items in my array and a numColumns integer that can range from 1 to 5. So, if I receive, say, 14 items and 4 columns: []item 1 []item 5 ...
4
votes
1answer
25k views

Angular Search for value in JSON and display corresponding data

What i am trying to do is simple. A user enters a value, on button click, my JS calls a service to retreive my JSON data and perform a search on the value entered against the JSON and if a match is ...
0
votes
1answer
535 views

Angular Directive addEventListener with ng-repeat

I currently have a directive that adds a few event listeners to an element in the link function. e.g.: ... link: function(scope, element) { // this gives us the native JS object var el = ...
0
votes
3answers
31 views

Filtering data using checkbox

For default must show items that have prop "state: 'notarchived'" and "state: 'archived'" must be hided When I have a Check I need hide elemets with "state: 'notarchived'" and show elements with "...
0
votes
1answer
35 views

Delete button “delete” after clicking in ng-repeat

I'm showing data by ng-repeat. There Have button. to delete item. After delete item, this button must dissapear only for item that I deleted. <tr ng-repeat="paymentinfo in paymentList | filter:...
-2
votes
1answer
39 views

ng-repeat not showing any contents

I'm trying to put the content in my MongoDB using Mongoose and AngularJS. So far everything seems to be working but when I use ng-repeat the table comes up blank. HTML code <div class="container"...
4
votes
1answer
24 views

Create select with otpgroup based on two different data

Hi Friends here two data in one JSON file where I need to create Select option based on country field and show data based on location field "countries": [ { "id": "75", ...
0
votes
1answer
31 views

How to filter table data in ng-repeat with date

I have the following index.cshtml <td>From:<input kendo-date-picker ng-model="date1" class="form-control input-sm" /></td> <td>To:<input kendo-date-picker ng-model="date2"...
1
vote
1answer
39 views

AngularJs: Nested UI-Bootstrap accordion not working, when update list value

I generate "ui-bootstrap accordion" by ng-repeat. I want upddate value of list dynamically. But when I update nested list value, second accordion is not working. <uib-accordion close-others="...
1
vote
1answer
878 views

Angular 1.0.7 ng-if alternative

I want to create a paragraph view at my application, where every 5 items display in a block, one under each other, and the next five in the next block; Example: <div style="display:inline-block"&...
0
votes
2answers
32 views

AngularJs - ng-options object.object

I am displaying countries and cities in a select box in angularjs, which are working fine. ng-model of country displays the output when I call {{country}}. However ng-model of city couldn't be called ...
1
vote
1answer
383 views

How to use ng-repeat to loop over inner contents of markup but not duplicate parent

How can I loop over the children nodes of ul.items (eg. li.item) without duplicating ul.items every iteration. Why?: I cannot loop over ul.items because height of that box is height: 100% and I need ...
2
votes
2answers
42 views

AngularJS input type hidden with ng-repeat

I'm developing an app and I've a table populated with ng-repeat and the last column of the table is an image that it is clicked open another page that should contains more details about the line of ...
-1
votes
0answers
38 views

AngularJS ng-if inside ng-repeat

What is more optimized? Inside an ng-repeat: ng-if="item.prop === $scope.items[$index-1].prop" or ng-if="item.prop1 === true" and setting "prop1" inside Javascript with the above condition? i.e; ...
0
votes
1answer
26 views

Angular JS: ng-repeat not generating an expected outcome

I have created an erray with name and extension property I want to traverse it using ng-repeat. May I know what am I doing wrong here? <%@ page language="java" contentType="text/html; charset=...
0
votes
1answer
18 views

Angular: Access variables from outside scope of ng-repeat

I am having issues accessing variables (attached to $scope) inside ng-repeat loop. My ng-repeat is as follows: <div class="row" ng-repeat="Message in Messages"> <p>{{ Message.Sender ...