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
1answer
12 views
Angular Js groupby some specific values in fixed order
I have an array listed as listed below
list = [
{
'id':1,
'name':'nitin',
'group':'angularjs'
},
{
'id':2,
'name':'test2',
'group':'php'
},{
'id':3,
'name':'test3',
'group':'nodejs'
},{
'id':4,
'name'...
0
votes
2answers
19 views
How to use ng-if with ng-disable
Below is my Code.
var myfriend = angular.module('myfriend',[]);
myfriend.controller('myfriendController', function($scope)
{
$scope.record = [
{ "id" : "01",
"...
0
votes
0answers
9 views
Using ng-repeat in form-group css
I have a form, which is using the form-group css. I want to add a ng-repeat which has 4 columns and will have multiple rows. The current code is as below:
<body class="ng-cloak">
<div ng-...
0
votes
0answers
13 views
Nested Ng-repeat in angular js and ionic framework for android
I want categoryList to loop 6 times and advertiseList 2 times and continue so on.
<div class="row">
<div class="col col-33" ng-repeat="(categoryKey,category) in categoryList" ui-sref="...
1
vote
2answers
24 views
Hide previous content on second click of the button of any loop inside ng repeat
I have a ng-show inside ng repeat. Whenever i click the comment button it shows the div tag contains comment box which shows previous comments of that list.
The actual problem is when i click one ...
1
vote
1answer
34 views
How to use ng-repeat with indexes in html
I have got a case in which is difiicult to explain so i put screen shots as follows
CASE:1-
Initailly when i click on add-on-one-field,i get the heading div like below,
CASE:2-
When i click ...
0
votes
0answers
16 views
md-select rtl with special character issue
I have a list with one of value starting with special character '@'.
$scope.neighborhoods = ['john','adam', '@jhonny'];
This list is used in md-select with direction: rtl. but in display the special ...
-1
votes
3answers
53 views
ng:repeat not loading data
This is my controller function to get data from server.
function carsController($http, $scope, $timeout) {
var vm = this;
vm.getCarData = getCarData;
function getCarData(){
$http....
0
votes
2answers
25 views
Filtering nested objects in ng-repeat with a search input field
I am trying to filter nested objects in ng-repeat by using a search textbox.
Given the following object:
$scope.items = {
"1": {
name: "First Item",
tag: "first"
},
"2": {...
0
votes
2answers
24 views
How to get selected value from ng-repeat
This is my code.
I m getting data through ng-repeat and showing it as shown in below code.
What I want is if I click on either of the name then it should alert me with that name. How can I achieve ...
0
votes
0answers
23 views
Using ng-repeat with bootstrap css and span tags for error message
I am using Angular Js, in which I am using bootstrap css. I have a ng-repeat added to the form. I have a submit button at the end of page. I have added a required field validation to each of the ...
0
votes
5answers
65 views
How to make angular select to select a selected value
I have selected value coming from back end in JSON and i have select element content coming from back end in the same JSON also.
Problem is that selected value is not selected in the select element, ...
0
votes
1answer
32 views
ng-repeat not working when i use constant
Im new at AngularJS.
I have to make dropdown menu from the constants.
Here my code:
.constant('COLORS',
[
{red: '#ff0000'},
{green: '#00ff00'},
{blue: '#0000ff'}
]
)....
0
votes
1answer
10 views
AnguarJs: ng-repeat only work after clicked button inside directive
I want to bind an array (customLayers) and use it for ng-repeat.
I fill the array inside the kv.colorMap Object.
I have three directives using these technique. But the directive updates the binded ...
0
votes
1answer
19 views
How to use ng-repeat to show a templateUrl
How to use ng-repeat to show a templateUrl?
Hi guys i tryied some ways in order to show all elements of a templateUrlby using ng-repeat butunfortunatelly i didn't figure it out!Anyone who can help me ...
0
votes
1answer
31 views
dynamic template adds empty value on ng-repeat
I have been trying to make a query builder for my own purpose.
This plunker https://plnkr.co/edit/95VgJfH9nIScwApXyKOu?p=preview has my work so far,
When I select a parameter and Click on add, it ...
-1
votes
3answers
37 views
How can I access something from scope inside deeply nested ng-repeats
I have an ng-repeat which can actually nest an unlimited number on ng-repeats inside it based on what the user does. Basically they can create more items which then allows you to create more items ...
0
votes
1answer
46 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">
&...
0
votes
0answers
33 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",
...
0
votes
2answers
36 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/...
1
vote
2answers
36 views
Angular ng-class via ng-click inside ng-repeat
Edit: The answers below haven't taken into account the +1 function that is also being applied. Still looking for how I can make both happen.
I have an ng-click function that is called on a button ...
0
votes
6answers
56 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
1answer
17 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">
</...
1
vote
2answers
41 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
1answer
31 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
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"> Id </th>
<th ...
0
votes
3answers
28 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
25 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
30 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 ...
0
votes
4answers
29 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?
&...
1
vote
1answer
49 views
How to apply different validation to different ng-repeat field and calculate its total automatically in ng repeat itself
Example Code:
<table>
<tr>
<td>Class</td>
<td> Input one </td>
<td> Input two </td>
<td> Total </td>
...
0
votes
3answers
22 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
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
41 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
41 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
39 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 ...
0
votes
0answers
17 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 ...
0
votes
2answers
20 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 : "...
3
votes
4answers
41 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-...
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
41 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 ...
2
votes
3answers
39 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 ...
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="...
0
votes
1answer
14 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 ...
1
vote
1answer
50 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 ...
3
votes
4answers
61 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,
...