Tagged Questions
0
votes
1answer
15 views
Angularjs dynamic directive inside ngrepeat
Look at example:
$scope.fields = [{
name: 'Email',
dir : "abc"
}, {
name: 'List',
dir : "ddd"
}];
app.directive('abc', function () {});
app.directive('ddd', function () {});
...
0
votes
1answer
24 views
Angular update ng-repeat based on model in controller
I am new to angular. i am trying to display a list of brands using ng-repeat. it is working fine. but when i click next button it should also change accorading array index. it is not working for me. ...
0
votes
2answers
26 views
AngularJS ng-repeat img ang video
How to implement the idea of a slider showing images and video.
How to get repetition via ng-repeat of different data types?
I have a list of files:
var scr = [
{src: 'img1.png', title: 'Pic 1'},
...
1
vote
1answer
18 views
How do I properly build an AngularJS labeled radio input directive?
I realize that AngularJS already has an input[radio] directive and I want to leverage that as much as possible.
I created a JSFiddle here, but I can't figure out how to get the ng-model property to ...
0
votes
1answer
22 views
I am able to query my api call, but i am not able to show it via angular
I have made an JSON api. I like to query this with angular.js. On my webserver i see the request comes in, and returns a status 200, so the data are called by angular. For some reason however, i am ...
0
votes
1answer
20 views
AngularJS ng-repeat double rows
I am trying to add a second row (<tr>) in the code below for each event in events in the ng-repeat. However, it only adds a single row at the end, I need each new row (class="info") to be ...
0
votes
2answers
23 views
Angular and JSON syntax getting confused with {}
I am new to angular and trying to integrate it within my application. I am attempting to use a simple ng-repeat (which works perfectly in an example project i setup). However, in the current project, ...
0
votes
1answer
22 views
make div hide if clicked elsewhere AngularJs
I have a question , how we can achieve this with angularjs.
## Html ##
<input ng-model="text" ng-change= "datashow(text)">
<div ng-show="showit" ng-init="showit = false">
//contains ...
0
votes
1answer
25 views
First item in Angular JS repeater not CSS :first-child
I have a series of divs in a project, in which the first one needs to be different from the others.
So I set up my css to be item:first-child{} as usual.
In some cases, these divs might be generated ...
0
votes
1answer
27 views
ng-repeat with jquery and rails
Im using ng-repeat to iterate over some json objects and trying to add {{code.id}} as a parameter for a rails route e.g.
card_url( @car, {{card.id}} )
I know this is not possible due to the rails ...
0
votes
0answers
24 views
Angular directive for generating directives
I have a screen in my app which should show a list of components. Now, components can be different, showing different HTML content and with varying behaviour.
So, what I need is to do an ngRepeat, ...
0
votes
1answer
11 views
AngularJS - Order a table's body matching the head
I have a table
<table>
<thead>
<tr class="">
<th class="" ng-repeat="span in realm.spans">{{span.description}}</th>
</tr>
...
0
votes
0answers
34 views
How to render a custom {{element}} from an ng-repeated list
Trying to get angular to render a list of directives after a drop-down is toggled in bootstrap.
Ideally, I'll $scope in the main view Ctrl:
$scope.directiveList = ['messages', 'events', 'cart'];
...
3
votes
2answers
31 views
ng-repeat filter with filtered properties
I have a list of data that I would like to search through using Angular's typical filtering.
I have an array of objects (one of a few below):
{
vendor: 'Joan\'s Produce',
date: '2014-04-07',
...
1
vote
1answer
19 views
How do I ng-src bind an image?
I am trying to use data-ng-src to display a pictures in my angular application. I get a value from my database field called "pic". For example let say the return value of the field "pic" is 125. I ...
2
votes
1answer
33 views
How do you access a child of ng-repeat item in a directive's scope?
I have just started using AngularJS. I would like to access to a div.item inside my ng-repeat but it doesn't work.
EDIT : When I click on addtime, the new item should be positioned in accordance ...
0
votes
0answers
25 views
Move elements down and flip one on top with ng-animate, css and/or jquery?
I have an angular app which essentially just holds a few "cards" right now, and has a button which adds a new card to the top of the stack. What I'd like is to use a combination of ng-animate, css, ...
0
votes
3answers
34 views
angular.js ng-repeat - check if conditional is true then use another collection
I'm wondering is it possible to check what collection to use inside ng-repeat?
For example, in my controller I have 2 arrays of data fetched from server, now I use ng-switch to switch between them, ...
0
votes
2answers
34 views
AngularJS - radio button not updating model
First steps in AngularJS. I'm facing a strange problem related to this, but the solution doesn't work to me, maybe I'm missing something (as I said, I'm a really n00b with angular).
I'm my HTML, I'm ...
0
votes
3answers
26 views
How can I show dynamically “nested” objects with ng-repeat
I have a Object with dynamic content, for example:
$scope.test = [
{
"name" : "device1",
"params" : [{"freq1" : "144"},{"freq2" : "160"}]
},
{
"name" : "device2",
"params" : [{"freq3" : ...
0
votes
2answers
51 views
Angular JS - repeat image tag for numbers in array
I'm modifying my question a bit since I was not able to get a proper solution previously.
I have an array products_page=["7","8","6","9","5","7","8","9","8","7"]
Each time the below table's is ...
0
votes
1answer
10 views
All values in array bound to same value
I'm trying to update values inside $scope.match.teams[0] with vaules for the players' names, but when I input in a single field, it is bound to every players' name for that team.
Controller:
...
0
votes
1answer
15 views
Edit JSON Response in AngularJS and bind to the list
Hi I know how to read form json and bind the output to the view however I would like to add some logic into the output and bid converted data. How do I output my forEach to the array and than do ...
1
vote
2answers
19 views
How do you show ng-repeated children of filtered array?
I have a drop-down filtered array, but the array I'd like to use is a little more complex, with nested data, similar to this http://jsfiddle.net/vojtajina/u75us/
I'd like to combine both ideas, but ...
1
vote
2answers
27 views
How solve method sort() in ng-repeat AngularJS?
I created an array with numbers, but in the method sort() not ordering it correctly in ng-repeat.
eg
$scope.order = ['1', '10', '11', '22', '29', '2'];
eg
<li ng-repeat="key in ...
0
votes
1answer
28 views
Angular JS Using “Multiple Filters”
I am using AngularJS in a SharePoint 2013 App but I don't think SharePoint here will influence the response (I could be wrong there, though).
I have a custom list of about 350 requests each with a ...
0
votes
1answer
22 views
How to search items from different views in Angular.js
In my home:
.state('home',{
url: '',
views: {
'': {
templateUrl: 'views/main.html',
controller:'MainCtrl'
}
...
I loop through ...
0
votes
2answers
35 views
Using Modal Window inside ng-repeat
I have a ng-repeat and I am trying to add a modal that passes the same scope variable to the modal window. I am able to get the modal window to open but the scope value from ng-repeat is not showing ...
0
votes
0answers
33 views
Default value on a Select2 with an ng-repeat with data coming from an API call
I have an angular select2 as follows:
<select ui-select2 id="clientID" name="clientID" ng-model="newTicket.clientstate" ng-required="true">
<option ng-repeat="item in clients track by ...
0
votes
1answer
39 views
Angular: ng-click only on subset of elements inside a ng-repeat
I'm using Angular; I have have an ng-repeat loop where I'd like to make some elements clickable.
Something like the following:
<div ng-repeat="item in itemList">
<span ng-class="{ ...
0
votes
1answer
69 views
Angular ng-repeat view not updating after custom filter
I have an ng-repeat that filters out items based on a category chosen by the user. When the page renders the category is all and none of the items are filtered. There are three categories and the ...
0
votes
1answer
24 views
Should I use directive instead of ng-include if there is too much in onLoad
I have a partial template called card.html. Im using it on many pages and some of these pages shouldn't include all the details. Because of that Im passing variables like showDetails=false; ...
1
vote
1answer
41 views
How can I animate the movement of remaining ng-repeat items when one is removed?
I have a dynamic list of items using ng-repeat. When something happens an item may disappear. I have handled smoothly animating the removal of these items using ng-animate, but after they are gone, ...
1
vote
1answer
26 views
Custom Directive kills ngRepeat
I was afraid I wouldn't be able to duplicate but, alas, I can duplicate the failure: jsfiddle
The example is simplified, but is exactly what I'm experiencing.
Basically I have a directive that ...
1
vote
2answers
30 views
Binding Angular element to scope outside of a controller
Still quickly learning AngularJS, what I have below is a simple test sample displying a listing using ng-repeat and what will eventually be a popup.
Fiddle
HTML:
<div class="container" ...
2
votes
1answer
36 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
1answer
10 views
how to setup default ng-model value for mutiple switch-toggle inside ng-repeat
I have used switch-toggle inside ng-repeat. I don't know how to set default value to ng-model when you have multiple switch-toggle in your form and on form submit you need to have all the values. I am ...
0
votes
2answers
50 views
How to get count of an object values in ng-repeat template
I have code <span ng-repeat="(key,value) in obj">{{value}}</span> where value is a number. I want to display total of all values in a last span.
Any speedy answer?
Thanks in Advance.
0
votes
1answer
47 views
AngularJS update output of ngRepeat
I have a table and with ngRepeat I am showing the products and details
I also have a directive
.directive('onFinishRenderFilters', function ($timeout) {
return {
restrict: 'A',
...
0
votes
1answer
41 views
ng-repeat changing sort order on all items when new item added to model
I created a "tessellate" directive that lets you wrap a number of divs.
<tessellate columns="4">
<div class="thumbnail" ng-repeat="item in items track by item.id">
...
1
vote
1answer
39 views
ng-repeat list in AngularJS isn't updated when an ajax call changing its value
I'm totally confused. Why doesn't my ng-repeat refresh when there's an ajax call changing its value? I've seen many Q&As here, but none of them talked about ajax call.
HTML:
<div class="row" ...
0
votes
0answers
18 views
AngularJS: How to listen to <input ng-change> when value is changed with a Slider?
Problem:
Running into an issue where I'm trying to use ng-change on a text field. The snag is I'm using a slider to change a value of this text field.
The ng-change event works when I click into the ...
3
votes
1answer
28 views
AngularJS : Filter sub-content in ng-repeat
Here's a sample JSON code:
$scope.info = [{"name":"Category1", "data":[{"name":"Item1"}, {"name":"Item2"}]},
{"name":"Category2", "data":[{"name":"Item3"}, {"name":"Item4"}]}];
...
0
votes
1answer
49 views
AngularJS controller, required by directive, can't be found (solved)
I have an error for each "message"
Error: [$compile:ctreq] Controller 'accordion', required by directive 'accordionGroup', can't be found!
with my code in html
<h2 ...
0
votes
1answer
25 views
Iterate(ng-repeat) angular array objects with start and end
I'm looking for an option to give start and end while looping the array of object in angular.
Now i'm using ng-repeat.
My use case is like i have a section "top" were 3 items to be shown from ...
0
votes
1answer
51 views
How do you animate table rows using ng-animate in the same way as one would list items?
It's quite simple to smoothly animate lists using angular's ng-animate, but tables seem to be another story.
Plunker list
Plunker table
The table move animations don't work, the items just snap ...
0
votes
0answers
126 views
Angular performance in ng-repeat
I was faced the performance issue of ng-repeat directive, I rendered the PDF formFields using ng-repeat directive, somehow it halts my browser. But when I use track by $index and limitTo:1 together in ...
2
votes
2answers
58 views
how can I avoid multiple tbody when using multiple ngrepeat in table
DEMO: http://jsfiddle.net/6dJ79/1/
The demo above works, however it achieves the results by repeating tbody. I'm wanting to avoid this.
Is there any other way that I can have a row for each color, ...
1
vote
2answers
41 views
$$hashkey showing up in ng-repeat output
One of the columns in my ng-repeat directive outputs the values of $$hashkey.
I have no idea how this started happening. I get data from a simple GET and inspecting that data as it gets in from the ...
0
votes
2answers
35 views
Angularjs - optimizing the watcher of ngrepeat to watch only certain properties of collection
In my angularJS application I have a collection (array) of rather large objects. I need to bind to this collection in various places (e.g. to display the property: name of the contained objects) - ...