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.
0
votes
0answers
23 views
Ng repeat to refresh when there is change in custom sort function return value
I am using a custom sort function like this:
WidgetSections.itemsOrder = function (item) {
if (WidgetSections.sortOnClosest)
return item.data.distance;
...
0
votes
1answer
11 views
Angular Filter and NgAnimate conflict
I am using angular-filter and angular-animate together, because I need do a group by in ngRepeat, but when I try to run, I am getting a error:
Uncaught Error: [$injector:modulerr] ...
0
votes
0answers
11 views
uib-accordion in angular for list display
My index page has two div's. In first < div > i extract names from $scope from controller mController. ng-repeat is used to iterate through the list to display Movies and Names in the first < ...
1
vote
1answer
27 views
ng-change does not work in the table row generated by ng-repeat
I have a simple table row.
The row is generated by below code.
<tr ng-init="cacheChanged">
<td>Expiration Period</td>
<td ng-repeat="system in ...
3
votes
2answers
37 views
How to apply filter in ng-repeat for object's fields?
I want to apply angular filter for selected object field. I have list of statuses ["waiting", "conform", "rac"], when I select a status it should give information of persons in the table which have ...
2
votes
2answers
3k views
OrderBy boolean value with AngularJS ng-repeat
I'd like to be able to sort by whether a variable is true or false.
Let's say we have a variable like so:
groups = {
{ name: 'first', value: true },
{ name: 'second', value: false },
{ ...
145
votes
5answers
65k views
passing 2 $index values within nested ng-repeat
So I have an ng-click nested within another ng-click in order to build a nav menu. On each <li> on the inner ng-repeat loop I set an ng-click which calls the relevant controller for that menu ...
0
votes
2answers
26 views
AngularJS multi-select using ng-repeat
I'm new to AngularJS and JavaScript. I've come up with a way to build a multi-select list, which is working. The ng-model associated with the dropdown is part of a "user" DTO object, specifically a ...
0
votes
0answers
8 views
data-checklist-model with nested ng-repeat not working
I am using angularjs and data-checklist-model.But i am not getting the checked value.
Here is my code.
<div ng-repeat='item in categorywisetag'>
<div class="row text-center" ...
0
votes
0answers
27 views
AngularJS nested directive priority with ngRepeat
I have a case where I have a child and parent directive. I need to run a function on the parent once all the child directives have been processed. I would expect to be able to do this in the parents ...
0
votes
0answers
19 views
AngularJs - Set ng-class on page load with data from server
I receive some data from the server and build several divs using ng-repeat. Each item has two buttons on it. Code looks like this:
<div ng-repeat="item in items">
<button ...
0
votes
1answer
19 views
angularjs create tree structure without recursive json data, based on just current node id
i have stored data like this
database json
<div ng-controller="AppCtrl">
<script type="text/ng-template" id="childshow">
{{s.Folder_Name}}
<ul>
<li ng-repeat="s ...
0
votes
1answer
25 views
iterate through sub-objects of ng-repeat with dynamic key value pair
I have a JSON object and I am iterating through this.
But, each iterated object has some child objects where I do need to iterate through them as well.
JSON structure:
[{
'name': 'a',
...
1
vote
2answers
38 views
ng-repeat and user selected value in angular data binding
I have three layer json parent-child object ( Persons > Projectors > Model ). When user clicks on one of the Projector i would like to capture that value and list Model belongs to only that Projector. ...
0
votes
1answer
25 views
Nested directive with no template but ng-repeat in parent directive
I try to explain my problem:
I have a custom directive that contains a list of elements (in this moment the elements are custom directives, but I don't know if it is correct).
For each element, I ...
262
votes
7answers
126k 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:
...
7
votes
2answers
7k views
Deleting entry with Restangular
I am using Restangular in my AngularJS app. I have a table with a delete link for each item. I would like to delete the item and have the row automatically removed. But as things are it only deletes ...
1
vote
1answer
38 views
Angularjs aliasing scopes
I'm stil learning Angular so forgive me if the question is nonsense
I have an object with this hierarchy:
{
a : [...],
b : [{
a: [...]
}, {
...
}]
}
That is I have ...
1
vote
1answer
58 views
How to calculate row total when using ng-repeat?
I'm trying to create a tracker using AngularJS and I'm having a bit of trouble with my logic when it comes to ng-repeat.
Here's what my table looks like to help explain what I'm trying to do:
So ...
0
votes
1answer
12 views
Md-switch doesn't work in ng-repeat
I have some repeated cards, retrieved from json. All works fine expect for the md-switch. I'd like that the switch button, which change the (not visible) status and the image. But it change all ...
0
votes
2answers
34 views
Two way binding an array of strings in ng-repeat
I have an array of strings, and i want each of the strings to be binded to an input.
However, editing the input doesn't seem to update the array (isolated scope issues maybe?).
Suggestions?
...
46
votes
11answers
65k views
How to make ng-repeat filter out duplicate results
I'm running a simple ng-repeat over a JSON file and want to get category names. There are about 100 objects, each belonging to a category - but there are only about 6 categories.
My current code is ...
0
votes
1answer
27 views
Animating ng-repeat on Remove
Consider the following example: http://jsfiddle.net/HB7LU/23956/
Buttons add and remove work properly and so do their animations. Here is my question: How can I animate elements when button Remove ...
4
votes
1answer
755 views
Angular-slick ng-repeat $http get
I've been trying all the week end to display data (that I fetch with $http.get) in the slick angular carousel using ng-repeat, in vain...
I've read about the well known issue: here and here.
I tried ...
0
votes
0answers
15 views
Ionic list divider text is not being updated correctly
I am building an Ionic app which has a list that is split using 'item divider'.
The problem I am having is that when I use the buttons I have in the app to change the list order etc. the divider text ...
1
vote
2answers
501 views
filter:notarray Expected array but received: 0
controller
@RequestMapping(value = "/graphs", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public Collection<Graph> getSkeletonGraph()
{
...
8
votes
5answers
16k views
AngularJs sort object in ngRepeat
I'm using AngularJs and found a problem in ordering properties of a hash object in a template.
My object is like:
function TestCtrl($scope){
$scope.week = {'MONDAY': ['manuel'], 'TUESDAY': [], ...
0
votes
3answers
40 views
Loading directive (dynamic templateUrls) in ng-repeat
Plunker Demo
I created two custom directives for template usage in a ng-repeater.
Outside of the ng-repeater, the directives work. Once I try to dynamically load the directives in a ng-repeater, the ...
0
votes
1answer
18 views
Change styles when ng-repeat updates after push AngularJs
I have an array of elements and I need to stylish the last item after pushing a new element.
This is my array:
$scope.items = [{id: 1, name: "Jhon Doe"}, {id:2, name: "Susane"}];
Array is binding ...
0
votes
6answers
73 views
Ng-repeat and Ng-show in angular
I want to display only the first element in ng-repeat and by click display the rest elements.
That's what I tried to do without success:
<button data-ng-click="term = !term">Show ...
1
vote
2answers
46 views
checkbox unchecking itself after angularjs filter applied
This causes the same item to be added to the array - which is used for querying - potentially twice. When the modal is closed and opened again and filtering is not used, everything is fine (this is ...
1
vote
1answer
30 views
Angularjs dynamically adding and removing elements using directive
I used directive for creating contact form. Initially i create customerForm directive for displaying customer form. In that form i have one button, when we click on add button, called getData function ...
38
votes
9answers
20k views
Angular ng-repeat add bootstrap row every 3 or 4 cols
I'm looking for the right pattern to inject a bootstrap row class every each 3 columns. I need this because cols doesn't have a fixed hight (and I don't want to fix one), so it breaks my design !
...
0
votes
5answers
38 views
AngularJS ng-repeat for a JSON contains String or an array of a same property
I'm having a JSON data namely $scope.family, it contains the family.name and optionally family.child
app.controller('test', function ($scope) {
$scope.family = [
{
"name": ...
3
votes
3answers
63 views
How do I use ng-repeat and filter properties over an array?
so my data is something like this:
[
{
"userid": "a",
"age": 19,
"name": "john"
},
{
"userid": "b",
"age": 119,
"name": "joy"
},
{
...
1
vote
2answers
26 views
POSTing item from ng-repeat
I have a simple ng-repeat, that displays a list of addresses. Next to each address is a button, when clicked, i want to perform a HTTP:POST. I know know how to perform a REST call, but im struggling ...
-1
votes
1answer
25 views
ng-class is messing up with static and dynamic content
I have introduced ng-repeat where static contents are already there. Its working properly. When i put ng-class and set the variable its not working. How to fix that issue and why its happening.
...
0
votes
2answers
19 views
How to set Where Clause for a inner ng-repeat in angularJS
I'm having a two JSON array,
$scope.color = [
{
"cInstId": 1,
"cInstTitle": "Blue"
},
{
"cInstId": 2,
"cInstTitle": "Green"
},
{
"cInstId": ...
0
votes
2answers
38 views
AngularJS ng-repeat for dynamic child json array
I'm having a dynamic JSON, which contains the list of name, it also contains the children names as a subset. How can I show it in the HTML UI using angularJS ng-repeat
The Sample Dynamic JSON is
...
0
votes
0answers
24 views
AngularJS highlight filtered text in ng-repeat
I have a list which displays properties from a JSON object. I'm displaying strings as well as numbers. I'm trying to highlight the searched input while the user types. I've seen many examples online ...
0
votes
0answers
25 views
List divider text is not being updated
I am building an Ionic app which has a list that is split using 'item divider'
The problem i am having is that when I use the buttons I have in the app to change the list order etc the divider text ...
1
vote
2answers
2k views
AngularJS $scope.push not updating the view from a $http data response
I’m performing a $http request to the 500px API for a set of popular photos. The response object is being returned successfully, and I’m having trouble pushing the returned photo items to the view.
...
1
vote
1answer
191 views
NivoSlider isn't working with base64 images loaded by AngularJS
When I use the nivoSlider with static images, it works like a charm:
<div class="slider-wrapper">
<div id="slider" class="nivoSlider">
<img src="img/someimage.jpg" ...
1
vote
1answer
20 views
How to get distinct values from JSON based on Foriegn Key using angularJS
I'm having two JSON Array, $scope.data has the primary details, which I want to show in the UI, in that cInstId is the foreign key from the JSON $scope.color.
The two JSON Arrays are
$scope.data = [
...
1
vote
0answers
24 views
Angular Move up/down through Dropdown List Items with Keyboard from Toggle Dropdown Button
I am working to add keyboard functionality to my Dropdown List, below is the directive template. I am passing in data through isolate scope bound to "ctrl". I am using Angular and Bootstrap. I'm ...
9
votes
4answers
15k views
How to properly execute a function inside ng-repeat
SITUATION:
I am making an app in AngularJs that assign permissions.
In order to do this i have three nested ng-repeat.
First loop: display PERMISSION GROUP
Second loop: For each permission group ...
1
vote
1answer
31 views
How can I get specific information from an external api to my ng-repeat
main.html
<div class="row" ng-repeat="post in myBlogPosts.slice().reverse()">
<br>
<div class="col-md-9 text-center">
<a href="#/blog-post/{{post._id}}">
...
1
vote
1answer
34 views
How to use properly ui-select in ng-repeat directive
I have an ui-select which is wrapped in ng-repeat directive. Since they share the same scope I have several problems:
after selecting value in first select second select is already prefilled with ...
0
votes
0answers
31 views
AngularJS dynamically add key and value to an object
I would like to ask you how I can add a key
and a value to an object. I want to get values from textareas, which
are generated with the help of ng-repeat, and to push them to an object.
courses: {}
...
107
votes
10answers
73k views
angular ng-repeat in reverse
How can i get a reversed array in angular?
i'm trying to use orderBy filter, but it needs a predicate(e.g. 'name') to sort:
<tr ng-repeat="friend in friends | orderBy:'name':true">
...