Tagged Questions
0
votes
0answers
11 views
editable with ngrepeat: automatically editing the latest added item
I need to add new items to a collection, that gets rendered with ngrepeat and using xeditable make it automatically editable.
BTW, I'm using the "manual trigger" method for xeditable.
Here it is the ...
0
votes
1answer
27 views
How to $watch changes on models created by ng-repeat?
Consider this Plnkr for example. I don't know how many members of fooCollection will be created beforehand. So I don't know how many bar models are going to exist.
But I know they are going to be ...
1
vote
1answer
28 views
What is the difference in behavior between ng-repeat and statically typed out code?
What is the difference between the html and the behavior produced by this ng-repeat code:
<div id="settings-row-{{key}}" class='settings-row' ng-repeat="(key, value) in items">
...
2
votes
1answer
27 views
Repeaters, Switches, and Sections, Oh My
I'm trying to make a form designer/builder with webapi and angularjs. I'm passing a number of fields given a form id. One of the key value pairs that is passed along is what section the field should ...
1
vote
0answers
38 views
AngularJS: Load dialog for ng-repeat with large number of items
I am trying to come up with a way to display a load dialog while the items in ng-repeat are being rendered. The use case is as follows:
User clicks a toggle switch to display a list of items
A ...
0
votes
0answers
25 views
How do I group a list of persons with ng-repeat when each person can be in multiple groups?
As explained in the title I wish to group a list of persons.
app = angular.module('plunker', [])
app.controller 'MainCtrl', ($scope) ->
$scope.persons = []
for i in [0..20] by 1
if i ...
0
votes
0answers
18 views
Table rendering performance is slow in angular. Can I just bind selected rows on user interaction
Is it possible to bind the data of a single row on a user interaction like 'click', to selectively bind model data.
I am using Angular to build a table with inputs.
It is using 2 nested ng-repeats ...
0
votes
2answers
33 views
AngularJS Group By Directive
I'm new to Angular and would like to learn the best way to handle a problem. My goal is to have a reusable means to create group by headers. I created a solution which works, but I think this should ...
1
vote
2answers
55 views
AngularJS: Error while interpolating: {{ $index + 1 }}
I used $index inside simple ng-repeat to show items' number:
<li ng-repeat="item in dataList | limitTo:5">
<span>{{ $index + 1 }} </span>
</li>
And it worked OK for ...
0
votes
1answer
30 views
Display an array in angularjs
I have an API on my nodejs server which will return an array.
[
"123_ayesha098",
"3ar7hkung",
"aali",
"Abdelhak",
"adityaputra",
"adraga",
"agnusdark",
"ahkeno",
"ahmedjubayer",
...
1
vote
3answers
36 views
Why is this Angular model not completely overwritten?
I'm encountering a strange issue where a model is not completely overwritten after a new property has been set on it in a directive.
HTML:
<div ng-app="app">
<div ...
0
votes
1answer
26 views
How to refresh controller from a directive?
Here is the demo : http://plnkr.co/edit/atZZXM6YVYQL0SilpWxq?p=preview
In a table, I display each value of my collection, everything is fine. But when I remove one element in the list, the controller ...
1
vote
2answers
37 views
ng-repeat inside UL (which is inside a P) is not working
UPDATE: It seems Angular.js doesn't like the <ul> inside a <p>. So, as helpful commenters said, replacing the <p> with a <div> solves the problem.
Sorry if this may be a ...
0
votes
1answer
17 views
Select Last HTML Select element from multiple select elements using AngularJs
Hello guys I am working on an application where I am using django-tastypie as backend and AngularJs for front end.I am totally new to AngularJs. In my template there may be multiple HTML tags based ...
0
votes
1answer
27 views
Angularjs creating questionaire that allows ranking choices
I'm creating a questionaire for users that allow them to choose and rank personality attributes that best match them. There are three choices in each row and everytime they click on a choice it ...
1
vote
1answer
62 views
Recursion using Angularjs and Append Elemnts to an HTML Template
I am quite new to Angularjs . I am working on an app which use Angularjs for front end and django-tastypie for back end. What I am doing is i have a topics list where topics are nested in each others ...
0
votes
3answers
32 views
how to bind 3 arrays simultaniously using angularjs
I tried using ng-repeat value,group1,group2
i'm getting
grp1
grp2
abc
def
value1
value2
I need
grp1
abc
valu1
grp2
def
valu1
Html:
...
0
votes
1answer
55 views
Dynamically reloading ng-repeat data in the DOM
I have the following code in my view:
<li ng-repeat="i in items">{{i.id}}</li>
I would like the ng-repeat to be trigged dynamically when new values are added/removed from items. As in, ...
0
votes
1answer
17 views
angularjs option list becoms empty when i select an option
I am working on a django-tastypie api application where i am using angularjs as JavaScript framework.what I am doing is i have a list of curriculum objects where each curriculum object contains a list ...
0
votes
2answers
42 views
Javascript convert three arrays to one for use with AngularJS directive
I have a $http call with which I retrieve an array of objects. I make three calls to this endpoint and end up with three arrays like the following:
[
{type: Dog, count: 3}
{type: Cat, count: 4}
...
0
votes
0answers
38 views
Applying filters in AngularJS
I have a table which should show a resultset, filtering the result against the value of a user input:
<input type="search" ng-model="search">
<table>
<tr ng-repeat="person in ...
0
votes
1answer
24 views
Angularjs JavaScript runtime error: 10 $digest() iterations reached. Aborting
I am trying to use bootstrap 2.3.x with angularjs to create a menu bar for my webpage as shown below.
<div class="container" >
<div class="navbar">
<div class="nav-collapse ...
0
votes
0answers
26 views
ng-repeat IE8, parentNode is null or not an object
I'm using AngularJS 1.2.0-rc3, I also tried AngularJS 1.0.8 and the other release candidates, but this problem keeps popping up.
I have an ng-repeat in my template that gets it's array asynchronously ...
0
votes
0answers
33 views
AngularJS - Range slider doesn't work in ng-repeat (plugin)
I am trying to use this plugin in my project to have multiple range slider within ng-repeat. http://prajwalkman.github.io/angular-slider/
The plugin works fine when there is single slider , but when ...
2
votes
1answer
37 views
autoscroll angularjs doesn't seem to work
Hi I'm building a chatapp in angularjs and I want the chatbox to scroll down automatically. I'm using this example that I put in a directive: http://jsfiddle.net/atRkJ/
It works as it is but when I ...
0
votes
3answers
73 views
How to render HTML in a partial with ng-bind-html and $sce inside ng-repeat -> ng-switch -> ng-include?
As mentioned in the title, i can't figure out how to render html inside a partial with ng-bind-html.
Here is a plunker to illustrate.
http://plnkr.co/edit/YFfHsahcum7XA8GcH6b2?p=preview
I tried ...
0
votes
1answer
15 views
Angular orderBy Date
I have an array which I want to order by date in Angular.js:
<tr ng-repeat="er in vm.readerFeeds | orderBy:'-publishedDate'">
<td>{{er.publishedDate}}</td>
</tr>
The ...
0
votes
1answer
43 views
AngularJS multiple selection model data binding
I am using AngularJS v1.2.0-rc.3.
I have a model y with a 1 to many relationship with model x.
Initially, I had a form for model y with a multiple select for xs, something like this:
...
0
votes
3answers
76 views
AngularJS event for when model binding or ng-repeat is complete?
We have a large model and it takes a couple seconds for ng-repeat to bind all the items in the model to the form. We would like to show a spinner while it this is happening. Is there some event that ...
1
vote
2answers
65 views
Angularjs isolates scope directive with ng-repeat
I'm trying to use directive on ng-repeat items each with an isolate scope but it isn't working. I'm looping through each item and coloring it red with the inboxuser-select directive. However, when I ...
0
votes
1answer
34 views
Unable to print scope variable inside ng-repeat
I am trying to associate id inside an ng-repeat loop. Can someone suggest how can i do this?
here is the code
<li ng-repeat="agent in agents">
<chart ...
0
votes
1answer
21 views
AngularJS Filter in rails
I'm trying to make a searchable list of posts on a ruby on rails application that I made. I have AngularJS working on the application. All of the posts are saved on rails in @posts. How would I make ...
1
vote
1answer
16 views
Repeating an object or arrays within an Repeated object in AngularJS
Is there a way to repeat an object or array of items within an object already repeated? As an example if I have this set up:
items = [
{name: 'title', person: [ person1, person2, person3, etc. ]},
...
1
vote
1answer
63 views
AngularJS nested ng-repeat with grouped lists does not loop
My object model is a list of ItemLines, which each contain a number("quantity") of "part". Here is the data structure:
ordersItemLines = [{
"quantity": 1,
"part": {
...
0
votes
3answers
28 views
Angularjs: nested ng-repeat with key reference from one to the another
I want reference the key value from one repeat value to the other. Its a bit hard to explain but here is the jsfiddle http://jsfiddle.net/u75us/163/
I want to get the f_column value from key_var ...
0
votes
1answer
22 views
Ng-options dropdown concat fields if the second one is not empty
I have a table users, every user has a username, but there is also a nullable displayname in the table. I want to show al users in a dropdown with their username, and if available also their ...
0
votes
0answers
28 views
How to get a callback when element will be completely builded
I have custom directive which moves DOM element on every ngShow which returns true. This directive requires dimensions of dom element.
HTML
<div class="span5 search-results__mentions-block" ...
1
vote
1answer
32 views
Angular JS: $index like parameter of a filter
i want to pass the variable $index like parameter of a filter. The code is the next:
HTML:
<div ng-app='myApp' ng-controller="Main" >
<div ng-repeat="i in (filtered = (elements | ...
3
votes
1answer
82 views
Simple One way binding for ng-repeat?
I have read some articles that said ng-repeat would led to poor performance if there is over 2000 items, because there are too many two way binding to watch. I am new to angularjs and have trouble ...
0
votes
1answer
38 views
Avoid duplicates in a repeater are not allowed
Is there any built-in feature on AngularJS to avoid ng-repeater to receive duplicated entries?
Right now I'm using the following code to prevent it:
$scope.tags = ...
0
votes
1answer
24 views
order item in ngrepeat follow property of item
How can I order the post to top-down structure (the post which has highest likes number will be first and the last is the post which lowest likes number). To do that I set oderBy:likes.length but it ...
3
votes
2answers
57 views
angular ng-repeat skip an item if it matches expression
I'm looking for a way to basically tell angular to skip an item in an ng-repeat if it matches an expression, basically continue;
In controller:
$scope.players = [{
name_key:'FirstPerson', ...
1
vote
1answer
34 views
Input field blurs when inline editing in ng-repeat
I am trying to do inline editing on a table of data (See the plunkr)
<table class="table table-bordered">
<tr ng-repeat="data in dataset" >
<td ng-repeat="(key, value) in data" >
...
3
votes
2answers
83 views
ng-repeat not loading data after html has been compiled
I have a directive that copies a bit of html that includes a controller and an ng-repeat. I compile the html and stick it into the dom. I can see that the new html is picking up the scope of the ...
0
votes
1answer
51 views
ng-repeat without duplicates
Is there any "angular way" to avoid displaying duplicates in ng-repeat?
If we add duplicates in the array it will pop-up [ngRepeat:dupes] and this can be solved with ng-repeat="item in items track by ...
0
votes
1answer
50 views
Filtering with multiple checkboxes in angularJS
I'm new to AngularJS. I wrote a program to filter the Item list when i check related check boxes. But here my CheckBoxes are behaving like "Radio" buttons. Anyway, program is working but it is not ...
1
vote
1answer
34 views
angularJS: Why does binding to scope inside a directive result in lost content of ng-repeat?
I have this fairly simple HTML structure:
<div ng-controller="MyCtrl">
<div dir1="xy"><div>dir1static</div><div ng-repeat="item in ...
0
votes
0answers
40 views
$index of ng-repeat inside the attribute (AngularJS)
That's must be very simple,but: have this HTML
<li ng-repeat="title in mainTree">
<a href="#cable{{$index}}">{{title.title}}</a>
</li>
JS tells me, that caught Error: ...
0
votes
1answer
36 views
Angular.js // Getting element by attribute value
Having the following in a json response :
[
"alt_sizes":[
{"width":500,"height":333,"url":"http://..."},
{"width":400,"height":266,"url":"http://..."},
...
0
votes
1answer
28 views
Split for ng repeat item?
Simple question- if I have this in my controller:
$scope.somedata = 'Item 1, Item 2'; // set from something else
is there a way to split somedata for my view in a ngRepeat expression? Something ...