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
729 views

Scroll to top of md-virtual-repeat

I am trying to add a "scroll to top of page" button inside an md-virtual-repeat-container. I am currently using $anchorScroll. I have set the hash to a table head (I have tried setting the hash inside ...
0
votes
3answers
22 views

orderBy on ng-repeat is not working despite data being an array

In html <div ng-controller="homeCtrl as home"> <a class="list-group-item" ng-repeat="e in home.events | orderBy:'popularity'"> {{ e.name }}</a> </div> In the controller var ...
0
votes
0answers
15 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 ...
0
votes
2answers
19 views

Nested ng-repeat on angular is not working

I'm using an ng-repeat to show the sections of a form, inside every section I must show the questions so I'm using one nested ng-repeat but I don't know how to show (or why not shows) the values. ...
0
votes
2answers
24 views

ng-repeat with error message alignment

I have a ng-repeat control having textbox, textarea, and a delete image icon. I am having a required validator added for the textbox , textarea. Once the span error message is shown, the alignment is ...
0
votes
1answer
43 views

Convert Object's array to HTML table in Angular

I have a list of object like this : var entryList = [ { "Key1": "Value1", "Key2": "Value2", "Key3": "Value3" }, { "Key1": "Value1", "Key2": "Value2", "Key3": "Value3" }...
0
votes
1answer
20 views

Filter through multiple properties in AngularJS

I am trying to filter through multiple properties in Angular. I am able to filter through one property easily by using filter:{ title: searchString } but when I try to use multiple properties... it ...
0
votes
0answers
16 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
2answers
21 views

How to know if AngularJS filtered and limited lists lengths are the same

I'm trying to show an alert in case a filtered and limited list has elements not being shown. I'm looking for a good performing solution, as these lists will be really long. Here is what I have from ...
0
votes
0answers
14 views

angularjs ng-repeat autonumber increment from multiple arrays

I have this ng-repeat: <div ng-repeat="prop in props"> <div ng-repeat="tenant in prop.Tenants"> <label class="col-md-6 control-label">Tenant {{$index?}} ({{tenant....
2
votes
1answer
52 views

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

i have a table in my angular app and each row of it has a checkbox ,i want to push all of selected rows in an array or object. Here is my HTML code: <table class="group-tbl"> <thead> ...
0
votes
0answers
36 views

Nested Angular Ng-Repeat Performance

I have an odd ng-repeat problem related to performance (or at least I believe it's ng-repeat related). I have a list of items that will never be more than 10 or so, but this problem occurs regardless ...
1
vote
1answer
33 views

Ng-repeat filter search using MySQL data

I am trying to populate a div tag with ng-repeat and data from a mysql database. I want to use ng-repeat because I want to apply a filter later on. My problem is combining angular and sql. I want ...
0
votes
1answer
381 views

AngularJS: orderBy filter to reverse the order of the table rows does not work

I am writing a web app that allows users to post to a server and the front end displays all the posts. However, when a user adds a post, it goes to the bottom of all posts first. I want the newest ...
11
votes
3answers
4k views

jQuery Swiper script to run after Ng-Repeat elements are loaded

I'm making a web app using AngularJS, jQuery, HTML, CSS and Bootstrap, and I would like to pick some image links from my JSON that is located in an Apache2 server and use them in order to render those ...
1
vote
2answers
35 views

AngularJS - TypeError: v2.[xxxx] is not a function

I am trying to conditionally set the background position of a div element based on their array index using ng-style. Each div is being generated using ng repeat. In my html page, I have the following ...
0
votes
1answer
18 views

Validate controls within ng-repeat: textbox and textarea

I am using Angular js, in which i have a textbox outside and an ng-repeat containing textbox and textarea. I want to check if the fields contain value when submit button is clicked. I am able to ...
0
votes
1answer
30 views

How I can parse an array (from function) inside ng-repeat

Here is my prg-ctrl.js: $scope.getDataOfProject = function(project, year){ var projectData = project.data[year]; var smthData = []; for (var i = 1; i <= 12; i++) { if (...
9
votes
2answers
20k views

AngularJS: How to change ng-repeat limitTo based on variable?

I would like to show a different limitTo number on Angular.js ng-repeat, based on a variable. Here is my code: <input type="text" ng-model="search" ng-change="checkNewCard(search)"/> <div ...
1
vote
4answers
53 views

Angular ng-repeat not updating array

I have an array as follows: [7500, 15000, 21300, 3600] This array is printed in the view using ng-repeat. But my problem is, I'm updating this array every second using setInterval, it is fired, and ...
1
vote
3answers
36 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 ...
3
votes
4answers
56 views

Dynamically add property to object in angularjs ng-repeat

I have a list of object and iterating that list using ng-repeat to generate table row. each td contains source name and checkbox. I want to bind the checkbox with a property which is not available ...
0
votes
2answers
46 views

angularjs optimize ng-repeat with many ng-if ng-show inside it

I use AngularJS to create a page where a user can correct a text (for example grammar, typo ... ). I cannot use a Textarea because I want to keep trace about changes and let user rollback a ...
1
vote
2answers
45 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 ...
3
votes
3answers
45 views

ng-repeat display key value in view

http://jsfiddle.net/qq2L34eb/1/ I want to display Monday but the value attr is equal to one using ng-repeat. $scope.days = [{ "Mondays": 1 }, { "Tuesdays": 2 }]; But I got the entire object ...
1
vote
1answer
30 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 ...
3
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
0answers
23 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
41 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
44 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
25 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
57 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
51 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
48 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
32 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
20 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
27 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
73 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
33 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
55 views

moving one array into other array for handling ng-repeat

var res = { "response": { "data": { "profilesearchsnippet": [ [ { "profileInfo": { ...
1
vote
6answers
43 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
50 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 ...