Tagged Questions
0
votes
3answers
56 views
Angular Evaluate Function within Ng-Repeat
I couldn't think of a great way to title this question, but essentially I'm wondering what the best solution is for evaluating expressions within Ng-Repeat. For example, if I have some code that looks ...
0
votes
2answers
26 views
Does anybody know how to make an anchorScroll inside ng-repeat?
I need to know how to make an anchorScroll to differents ID inside a ng-repeat menu.
<li data-ng-repeat="page in pages">
<a href="{{href}}">{{ page.title }}</a>
</li>
...
1
vote
1answer
18 views
AngularJS: ng-repeat to assign different values to buttons; how to extract the value to js when pressed?
I am using angular to build a waitinglist-system, where you first join a waitinglist, and then can be moved to the memberlist. I use ng-repeat to fill inn the table with the rows of waiting people, ...
0
votes
2answers
33 views
Angular filter with minimum and maximum values
I'm having some trouble getting angular to properly filter my results. I'm attempting to use a custom filter that gets arguments from a minimum input and a maximum input.
/index.html
<input ...
-1
votes
3answers
46 views
Call another controller from inside ng-repeat
I am new to angular and I am trying to call a function from another Controller. I do not want to define an addIssue function in ItemsController which calls IssuesController.addIssue or share a ...
2
votes
1answer
84 views
AngularJS: How to run code before ng-repeat starts?
i have ng-repeat on two custom directives I've created - node and specialNode:
<node data="currentNode" specialNodes="specialNodesArray"
ng-repeat="currentNode in ...
0
votes
0answers
18 views
ng-repeat seems to be scrolling my page down on load [on hold]
I'm writing my first AngularJS app. All the big issues are being elegantly handled by Angular, but there is one boring issue that is annoying me.
The situation is: when my angular app is loaded, one ...
2
votes
2answers
36 views
angular ng-repeat is not working
I want to run a small example but it is not working.
the html.
<body ng-app="angello">
<div ng-contoller="mainController">
<div class="span4 sidebar-content">
<h2> ...
0
votes
3answers
27 views
multiple filters in angular view
I have this
<li ng-repeat="phone in (filteredNumber = (phones | filter : 'jason Raq'))">
this works fine and show me the name json Raq as filtered result but now I need two names . Jason and ...
2
votes
2answers
28 views
background default image if ng-style image loaded is invalid url
I am adding background images to my div like this
ng-style="{'background-image' : 'url('+ myvariable.for.image +')'}">
where myvariable.for.image is a url like /examplesite/image/id
This works ...
0
votes
1answer
23 views
How to use ng-repeat with an ajax request with DataTables?
Let's say I'd like to load a dataTable dynamically, but instead of using normal ajax function within datatable, I'd like to load it through Angular, use ng-repeat to generate the tr elements and then ...
1
vote
2answers
34 views
css in angular not working
I am trying to have background image of a div injected dynamically. I see images getting loaded fine but the CSS doesn't change and div never get the background-image. what am I doing wrong
I have ...
0
votes
2answers
99 views
+50
Is it possible to update the model after keypress but before keyup?
I was developing a todo-like application with jQuery but I'd like to switch to Angular.
There is an input field for adding a new item, but as soon as anything is typed into this input, the key ...
0
votes
2answers
40 views
Is it possible to initialize a data binding in Angular from HTML rather than JavaScript?
What I mean is, say I have this HTML:
<ul ng-controller="ContactsCtrl">
<li ng-repeat="contact in contacts">
<div class="name">{{name}}</div>
<div ...
0
votes
1answer
62 views
how can I prevent Nested tables inside ng-repeat from populating in every row?
OK, so I want to create a dynamic nested hierarchy of tables. I get they data no problem, but using ng-repeat at each level causes the parent table to insert child data for a specific row into each ...
0
votes
1answer
36 views
how to use one ng-repeat over a nested object to populate multiple labels and options in a form
Explanation:
I would like to use one ng-repeat directive, that goes over a nested JavaScript object called $scope.templates to create and populate a form's labels and fields.
Current code uses ...
0
votes
2answers
37 views
weird behaviour of angularjs directive when wrapped
I have a directive like this, which wraps element with a container.
app.directive('myDirective', function($compile, $timeout) {
var num=0;
return {
link: function(scope, el, attrs) {
...
0
votes
1answer
22 views
Using ng-repeat over nested javascript objects to display select-options
How can I display two dropdown menus with the proper options using angular's ng-repeat directive?
Here's a JSBin
js:
angular.module('myApp', [])
.controller('MainCtrl', function($scope) {
...
0
votes
1answer
24 views
How to measure performance of Angular.js application (not REST services)
Are there any tools to measure performance of Angular Application running in Browser?
I mean Application code not REST calls.
This came to mind when I build a Form into Application that contained a ...
0
votes
1answer
27 views
angularjs ng-repeat and ng-model does not go well with textarea/input tag
When I generate input tags with ng-repeat and assign ng-model within custom directive
it invokes directive on every key stroke.
This is Demo
http://plnkr.co/edit/Oku8EH?p=preview
var app = ...
0
votes
1answer
38 views
How to assign ng-model value in template
I am trying to make ng-repeat safe pagedown editor in simpler way using a template in a directive.
This is the demo.
http://plnkr.co/edit/TOhGV4?p=preview
As you see from the following code, I bind ...
0
votes
4answers
42 views
AngularJS - Print JSON with ng-repeat
New to angularjs and trying to figure out how to print using ng-repeat.
My JSON feed looks like this:
[
{
"metric": [
{
"event": [
{
"id": ...
0
votes
2answers
29 views
AngularJS: ng-class - Using multiple classes?
I am new to AngularJS.
I want to add a class to the second column based on it's value. Example: I want add the class 'positive' if the value is > 0 and class 'negative' when it is < 0.
What I am ...
0
votes
1answer
19 views
angularJs: how can I update my selectbox dom content after deleting item in the ng-repeat value?
I am facing some problem with dom in my angular page.
Here is my code :
$scope.tab2 = [
{value:"value1"},
{value:"value2"},
{value:"value3"},
...
1
vote
1answer
62 views
How to implement url for dynamic tabs in Angularjs
I have displayed dynamic tab menu's using ng-repeat and i want to get individual url for each tab is it possible to get the url? if so how can i handle the route. i think its not possible to to set ...
2
votes
2answers
48 views
How to validate dynamic rules with dynamic form elements created with ng-repeat and using ng-form?
I have a dropdown that dynamically generates any number of text inputs, all of which have different validation rules (min/max length, pattern etc.). According to several other stackoverflow questions ...
0
votes
1answer
38 views
AngularJS How To Manage checkbox only in the controller.js?
Is it possible to manage and save the checkbox value (object) only in the controllers.js?
Thanks in advance.
I have this HTML-code (entity is an object):
<table>
<tr ...
0
votes
1answer
50 views
How to remove deleted row in ng-table
I have a grid developed using ng-table and I need to remove selected item from grid table after removing from server-side. Already tried to call the grid loading ajax again, but it's not working.
My ...
0
votes
1answer
45 views
Angular Count Occurences
I am using Angular for the first time, and i think i may have misunderstood how easy it is using this framework to calculate things like occurrence of nodes and node values.
I would like to be able ...
0
votes
1answer
34 views
angular ng-repeat fires many times than expected
Function key_helper gets called many more times than expected.if orderedkeys length is 5 it gets called 25 times instead of 5 times .I am not sure what code to incluce for better understating of my ...
-1
votes
2answers
31 views
How do I prepend a new item to an ng-repeat list?
I have situations where I need to prepend an item to a list that is initially generated using ng-repeat. How do I do this?
<div ng-click="prependItem()>Click Here</div>
<div ...
2
votes
2answers
57 views
AngularJS InfDig error (infinite loop) with ng-repeat function that returns array of objects
Here's my code:
<h1 ng-repeat="item in func()">something</h1>
$scope.func = function(){
return [{"property" : "value1"},{"property": "value2"}];
}
In Angular.js v. 1.1.1 there's no ...
0
votes
1answer
44 views
ng-repeat with ng-include not working
I am trying to use an ng-repeat that includes an ng-include. The problem is that the first element in the ng-repeat is just the ng-include template with none of the data from the ng-repeat filled in. ...
1
vote
1answer
46 views
Angular ng-repeat and ajax changes between 1.0.8 and 1.2.7
Happy new year!
There is one thing that I can't get, and i would appreciate if you help me.
What changed in ng-repeat and ajax logic between 1.0.8 and 1.2.7 Angular versions? I checked changelog but ...
0
votes
0answers
97 views
How to call a directive for each element in ngrepeat in angularJS?
I want to load a accordion controls dynamically by the data returned from the server using ngrepeat. Under each accordion i want to show a treeview based on accordions title. To load the tree view ...
1
vote
1answer
25 views
Angularjs ui:sortable in ng:repeat not behaving as expected
I'm trying to make a drag-and-drop editor for the values of an HTML <select> menu, with <optgroup> grouping.
I've been working in a JSFiddle; here's what I have at the moment. It ...
0
votes
0answers
65 views
ng-repeat boostrap-datepicker angular-strap $digest already in progress
I'm using angular-strap directives and displaying datepickers in my loop, like here:
<div data-ng-repeat="myobject in myobjects">
<div data-ng-if="myobject.category == 1">
...
0
votes
1answer
41 views
Bootstrap popover not working inside AngularJs ng-repeat
I have a countries list and I am populating those using ng-repeat, everything is working fine. Also, I am trying to show some other details inside each country by using the bootstrap popover and it ...
1
vote
1answer
31 views
Having trouble displaying a secondary array within an ng-repeat
So i have an array of slide image urls which i'm looping through here called slides.
<div class="presentForm" id="presentForm{{$index}}" ng:repeat="slide in slides" style="display: ...
1
vote
1answer
47 views
Updating scope in ng-repeat
According to several sources, using $parent to update a scope from within ng-repeat (because it has its own scope) is discouraged. I do the following to update the data model from within ng-repeat:
...
2
votes
1answer
47 views
How to iterate only through defined indexes in array?
I'm trying to iterate only through indexes I've defined in an array in angularjs, like so:
Controller:
$scope.days = new Array();
$scope.days[4] = true;
$scope.days[7] = true;
Template:
<!-- ...
1
vote
0answers
76 views
Modify model of parent scope in a directive with '=xxx' isolate scope?
I have an Angular directive which permit to render an user, and create a link to view the user profile, declared as:
.directive('foafPerson', function() {
return {
restrict: 'E',
...
0
votes
1answer
26 views
Nested interpolation
I return an array of people from the database eg,
[
{
id: 1,
name: 'Jim',
address: "123 Test Street",
phone: "999999999"
},
{
id: 2,
name: 'Tom',
address: "123 Test ...
2
votes
1answer
40 views
Improve speed of ng-repeat having ng-include inside
I am using ng-repeat with a div inside it having ng-include on an array of json to differentiate scope of same template included but this approach is slowing down loading of page when size of array ...
0
votes
2answers
51 views
Angular: Getting list with ng-repeat with dividers / seperators
Still pretty new with Angular, just finding my way around.
I'm using ng-repeat to output an alphabetised list of names. I'd like to add dividers within this list that act as labels.
Example:
...
0
votes
1answer
33 views
Passing data to different view/template - AngularJS
I just started with AngularJS, So my question might be very basic.
I have a link in one view, which once clicked calls a service, gets the data. In the controller i am changing the view using ...
0
votes
1answer
47 views
how to double nest angular ng-repeat
I have a template which is constructed in the following way...
<div ng-repeat="itemEntry in itemEntry">
<!-- content -->
<section class="product-view-wrapper" ...
1
vote
1answer
73 views
AngularJS ng-repeat rerender
I'm building a simple app with AngularJS. The app make a async AJAX call to the server and the server returns an array like this:
{
paragraphs: [
{content: "content one"},
...
0
votes
1answer
26 views
ng-repeat with compile or link?
I'm trying to get forms with fields created from config, with validation and other fine goods.
Here: http://plnkr.co/edit/8cP5YMKUGu6LfBCsRxAZ?p=preview is a solution, which works, but when I try to ...
0
votes
1answer
30 views
How to bring nested array of items in table format using ng-repat in angularjs?
I want to bring the table of items for each location using ng-repeat. I can't get around it using ng-repeat for the following structure. Please someone help me. Thanks in Advance.
The structure is.
...