Tagged Questions
0
votes
1answer
12 views
how to add Class to a template directive element?
i'm new to AngularJs Directive.
what i'm trying to do is , i need to add a simple class into one of my elements in template directive on click.
for example:
var app = angular.module("peykaar",[]);...
0
votes
0answers
18 views
ng-class is not applied on element with ng-repeat
I have the following custom directive:
angular.module('Interfaces').directive('Interfaces', function() {
return {
restrict : 'A',
scope : {
minor : '@'
},
templateUrl : '...
0
votes
1answer
15 views
disabling options in array of select using angular
I have an ng-repeat that creates an array of select elements. (The selects allow the configuration of columns in a table of data: 'name', 'address', 'phone', etc.)
No two columns can use the same ...
1
vote
1answer
26 views
Pass ng-repeat item to a scope variable in the controller
I am trying to use an item that i get in my view and pass it to a funtion in my controller , but i don't know how to save that particular item here is my code :
the view :
<tr ng-repeat=" p in ...
0
votes
1answer
44 views
Why does ng-repeat behave weird with auto-incrementing id?
I have a form that inserts into a MySQL database.
POST requests and GET requests work perfectly.
I've decided to add an id column in the MySQL table.
The SQL statement used to add my id column was: ...
0
votes
2answers
31 views
Filtering ng-repeat to value of table
So I am currently trying to filter a ng-repeat to only show indexes that have the same album name as their parent albums. I can't get anything to filter, it is just displaying every single song ...
0
votes
1answer
25 views
Detect ng-repeat elements length change in directive
I have angular-sly-carousel directive and some data on it. My data is adding when user scroll down , so after scrolling i need to reload sly carousel options.
How can I detect when ng-repeat elements ...
-1
votes
3answers
42 views
angularjs how to nest ng-repeat
In angularjs how should the JSON data be and how should the nesting of ng-repeat be to get the data as shown in figure ?
0
votes
1answer
25 views
Angular - How to filter data being displayed using ng-repeat based on select/options pick by user?
Data should be displayed based on the options field (by ng-repeating) (please see below). For example, if user picks 'The Best Company Denim', only users belonging to that company should be displayed. ...
2
votes
2answers
27 views
How to correctly loop / ng-repeat through nested objects/arrays?
I am using angulars ng-repeat and anything I looked up or try doesn't work and I don't understand why. I am 'looping' through companies.users and want to display all the first names. Any help would be ...
0
votes
2answers
41 views
AngularJS How Can I Ignore hidden table rows in ng-repeat but keep the increment?
I have an ng-repeat that generates a series of table rows. One column is titled "task status" and if the status is displaying "done", I see no reason in showing it, as the job has been completed.
I ...
1
vote
2answers
51 views
Why doesn't ng-repeat update dynamically?
I've literally checked out every single ng-repeat question out there but a lot of them don't deal with databases and people just use arrays in JS and a simple $scope.array.push("stuff") works for them....
0
votes
1answer
24 views
Custom Filter for ng-repeat in controller
I create a controller that shows data in li using ng-repeat.
The data has a variable called filter and used for categorizing the data. Now I want to filter the li based on this variable and want to ...
0
votes
0answers
35 views
Get values from ng-repeat and store in a list
I'm starting with Angular and JS.
This is my controller and HTML:
app.controller('ControllerProfesores',function($scope, $http){
$scope.listProfesores = [];
$scope.getProfesores = ...
0
votes
1answer
13 views
How to create an independent indexer with default value inside ngRepeat loop
I have a list of posts with comments. I need to traverse through array of comments inside each of the posts on my page. I'm trying to create variable inside ngRepeat for posts which I can use like an ...
1
vote
1answer
33 views
ng-repeat custom filter on key value object updates view only 2 times
I created a custom filter which filters key/value pairs e.g:
module.controller('tabController', ['$scope', function ($scope) {
var self = this;
self.items = {
"a": "a",
"b": "b",
...
0
votes
2answers
45 views
AngularJS ng-repeat cannot access last element of array after slice()
I have select using ng-repeat from array:
<select data-ng-model='selectedTagForNew' ng-change="selectedTagForNewChange()" >
<option ng-value="{{tag.arrayindex}}" data-ng-...
0
votes
0answers
12 views
Ionic slides and ng-repeat: why are options not working?
The autoplay option is not working in my slider which fetches the images I put in the ng-repeat. So the images are all fetched and that works, yet it seems like it's not recognizing them (I guess?) to ...
2
votes
2answers
35 views
10 $digest() iterations reached. ng class?
I am using a ng-class function in an element in ng-repeat. And I am getting this error. I am trying to pick a random class from the array. How do I solve this?
<div class="col-lg-4" ng-repeat="...
0
votes
1answer
35 views
Access Data from ng-repeat
i would like to use templates for a NetBanking app.
Therefore i constructed a basic service to get Objects filled with some Names and IBAN (unique key for banking transactions) in my service.js:
...
0
votes
2answers
37 views
AngularJS multiple nested ng-repeats
I have often done a nested ng-repeat to loop through child data when I have json such as
[
{ "accountnum": 1,
"name": "foo",
"subacct": [
{ "accountnum": 1-1,
"name": "bar"
...
0
votes
1answer
33 views
Can't print the Array in view using ng-repeat in angular JS
I have designed the dynamic table with the various type of the input field.We can add and delete the row as per the requirement.
Here is my HTML view code:
<body>
<div ng-app="appTable"...
1
vote
1answer
26 views
How to obtain values from input fields with Angular JS after ng-repeat
I'm new in AngulsrJS and I've got following code:
<form ng-if="editorCtrl.edit" class="form-horizontal" role="form" ng-submit="editorCtrl.saveEntry()">
<div class="form-group">
...
0
votes
4answers
30 views
hide and show only input fields per object in ng-repeat angularJS
So i have a group of input fields of location and description that i am repeating over with a show and hide button for the 2nd group
so my html:
<div ng-repeat="location in vm.locations" class="...
-1
votes
1answer
35 views
Mixing 2 json to in 1 . How ? ( AngularJS )
Get 2 json files from backend , and need to mix it !
First ng-repeat:
<p ng-repeat="category in categories track by category.id" >
{{ category }}
</p>
result
{"id":"Category-1"}
{"id"...
0
votes
1answer
60 views
ng-repeat not working in materialize Select list
I am using the materialize select list format to create a list that populates data from a database. Here is my angular/html code:
<div class="row">
<div class="input-...
1
vote
0answers
43 views
How to add row to form using Angular and onClick function
Hi I have looked at the previous answers and know the solution lies with ng-repeat however I think I am having problems with my click function and/or the structure of the data. I have an controller ...
3
votes
2answers
39 views
Angular JS ng-repeat nested array
I am trying to iterate array using ng-repeat, but not getting proper output.
<table>
<tr>
<th>Index</th>
<th>Items</th>
</tr>
<tr ng-...
-1
votes
0answers
24 views
angular js store value in input box value and custom attribute when use ng-repeat
<tr ng-repeat="item in filterData = (totalItems| filter : search) | limitTo:10:10*(page-1)">
<td>
<div class="checkbox checkbox-success" style="margin: 0px; top: 3px;">
...
2
votes
1answer
28 views
How to add dynamic property inside (key ,value) ng-repeat
I am iterating over list of objects using key value pair ng-repeat .I want to add a dynamic ng-model to a checkbox.
I have searched a lot but i didn't find any solution.I though found a similar ...
0
votes
1answer
36 views
AngularJS: GroupBy and show items
I've got an application where I retreive the information of some objects (into an array). That array would have the following structure:
$scope.items = [
{
id: 23289323,
event:...
1
vote
0answers
15 views
When Tying to print Datatable-button in metronic , I only see my data binding and not my real data
Well , I am working with Spring with Angularjs and Metronic template and I have issue in the print buttons for datatables-buttons I am trying to print a datatable that is filled with some data from ...
0
votes
2answers
32 views
Filtering ng-repeat does not work
I have the following list of people with two pets each:
[
{
"animalOne": "dog",
"animalTwo": "cat",
"age": 37,
"name": "Charles Andrews"
},
{
"...
0
votes
1answer
37 views
Blur all But one div in ng-repeat
I am making an angularJS app where my goal is, when a user clicks a button inside one of the ng-repeat div, it should get focus by blurring all the other entries in of ng-repeat. I have created a ...
0
votes
1answer
23 views
ng-repeat with nested ng-repeat between parent data
I have an array of objects with a players array. I'd like to display the info in a table row, but with the nested array's values in the middle of the row. I get all the info except the last column. ...
0
votes
1answer
25 views
AngularJS: Cloning element containing ng-repeat
I am creating a directive with Angular 1.6 which creates a fixed header for a table. I am trying to achieve this by clone the table header and fixing this. This all works fine in most of my tables. I ...
0
votes
1answer
19 views
How to use ng-src when there are more conditions to check?
I have 10 icons where each one for different types of alerts. I'm getting the type value from a service. I need to change the icon and style of text based on the type I'm getting from service. I'm ...
0
votes
1answer
77 views
How to break out of an ng-repeat loop?
Following case need to break out from ng-repeat loop
<div ng-init="myarr=['abc','xyz','pqr','mno','rst']">
<div ng-repeat="item in myarr">
{{item}}
<...
0
votes
2answers
38 views
Repeat parent row in nested ng-repeat Angularjs?
I have a table which is displaying nested ng-repeat values. The HTML looks like this.
<table class="table">
<thead class="bgThead">
<tr>
...
0
votes
1answer
53 views
Display php selected JSON data with angular ngRepeat
I want to display data which I select from a mySQL database using PHP. The data should be shown in angular variables.
I can see the JSON when clicking a button I installed. But the data will not show ...
0
votes
1answer
39 views
AngularJS: ng-repeat the list but with titles and grouped by
I have
myCtrl.guests = [
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"},
{"firstName":"Peter", "lastName":"Jones"},
{"firstName":"Albert", "lastName"...
0
votes
0answers
30 views
NG-Repeat won't update when array is changed
I have a table created using AngularJs
<tr class="restTable" data-ng-repeat="tag in tags|orderBy: 'number'">
I use a filter (<select> tag). And the following function on it's change:
$...
0
votes
0answers
20 views
Angular js - Toggle class in accordion element and remove the same class to others
I have a classic bootstrap accordion with panel generated by an ng-repeat.
I binded an element with ToggleClass, so when an element is clicked it add/remove a class named "focusPrint" to various ...
0
votes
3answers
59 views
Filter ng-repeat according to the first letter
In AngularJS, I have an array of Objects. I want to display data filtered for the first letter.
I used the following way.
HTML:
<p ng-repeat="film in filmList | startsWith:'C':'title'">{{film....
0
votes
0answers
20 views
Access ng-repeat scope from transcluded element
Since code's better than words...
Directive I'm trying to achieve:
<master-detail
translation-scope="mickeyMouse"
can-search="true"
can-select="true"
can-filter="true"
inject-...
0
votes
0answers
70 views
Angular JS filter with multiple properties in ng-repeat using javascript
I want to apply filters on an array in controller using java script. I am following below mentioned approach to apply filters.
$filter('filter')(array, expression, comparator, anyPropertyKey)
If I ...
0
votes
2answers
42 views
how to auto check in ng-repeat check box when i change dropdown values
hi all i am using angularjs ng-repeat i have checkbox and dropdown bind it now my need is when i change the dropdown values means automatically checkbox will check based on dropdown slection
<...
0
votes
0answers
54 views
ng-repeat not binding to scope data from service after route change
I have an array of objects being called from a service and passed to scope to be used by ng-repeat. After route change I see the array in the scope using console.log(scope.data); but it doesn't update ...
-1
votes
3answers
34 views
ng-click - hide all other div that isn't this $index within ng-repeat
What i'm trying to do is similiar to an accordion.
Simple put
i have an ng-repeat with an <a> tag that once clicked show another div called "Printpanel" nested inside it within ng-show.
If ...
1
vote
0answers
90 views
Again: ng-click not working inside ng-repeat inside ng-if
This is most likely going to be another Angular scope question. I looked hard for a solution on SO, however, nothing I found would solve my problem.
I am using Angular.js together with Swiper.js. ...