Tagged Questions
0
votes
2answers
19 views
Adding new form inputs continuously
I currently have a form where an individual can add firstname and lastname via two input fields. In some scenarios they may want to add more
than one so I want to provide button/bit of text below ...
1
vote
4answers
34 views
My text not add in list item in Angular js?
HI I m creating a new form and fill some text and submit but my text not save
Can u please help me
If i click a button add new than show a form add details in the form and save but not save .
I m ...
0
votes
4answers
28 views
My angular controller is not working?
I m new in Anguar js .
I have created a controller and pass the data but my controller not working can u please help me .
My code is this
Angular code is
var app = angular.module('myApp', []);
...
0
votes
4answers
45 views
Angular JS: ng-repeat with dynamic ng-model
I have this working piece of code that is repeated multiple times, hence would be great for a ng-repeat loop.
For example, two instances of my code are the following.
<div>
...
1
vote
2answers
33 views
Angular passing scope to ng-include
I have a controller that I wrote that I use in multiple places in my app with ng-include and ng-repeat, like this:
<div
ng-repeat="item in items"
ng-include="'item.html'"
...
1
vote
1answer
30 views
Bind value to object property, in an object, in an array, AngularJS
Ok, heres the pickle:
Im using ng-repeat to iterate through the menu items:
<!-- start the list/loop -->
<ion-list ng-repeat="this in menuItems.items track by $index" ...
1
vote
1answer
30 views
ng-repeat and ng-switch doesn't work on same element
JS
$scope.mode = "test"
$scope.array = ['test1', 'test2', 'test3']
HTML
<div ng-switch on="mode">
<div ng-repeat="item in array" ng-switch-when="test">
Test {{item}}
...
0
votes
1answer
15 views
Angular get dynamic variable from $scope inside ng-repeat
I'm unable to output a variable within my $scope inside an ng-repeat
The following variables are defined inside my $scope: error_question1 , error_question2 , error_question3
I have the below ...
0
votes
0answers
33 views
Calling a function when ng-repeat insert/remove items
I have a div that I need to calculate the height of this div based on a ng-repeat (adding or removing items).
Is there a way to have a callback for after ng-repeat inserts or removes items from the ...
0
votes
0answers
17 views
validation with dynamic name in ng-repeat
Im currently having an issue where I want to create multiple form inputs with validation. The form elements I want to
create will be up to 100 duplicated fields. To do this I have used ng-repeat as ...
1
vote
1answer
30 views
How to convert string to number or date in angularjs expression
I am using angularjs to make a pagination type of thing, say I have a 2D array and I am displaying the values from it. Its working fine but I also want to be able to edit thoes values so I used ...
2
votes
2answers
39 views
ng-repeat: populate drop down options with array
I have a simple JavaScript object that looks like this:
$scope.obj = { "'Architect'": ["asdf","d","e","y"]};
I'd like to show the values of 'Architect' in a select box. However, the single quotes ...
0
votes
3answers
32 views
Yet another AngularJS Error: ngRepeat:dupes
I am playing around with Angular and I have stumbled on another issue. I am trying to pull data from an external js file and I received the 'Error: ngRepeat:dupes' error.
<div class="productRow" ...
0
votes
1answer
28 views
angularjs ngRepeat leaving html behind when template contains another ngRepeat
I have a controller with an array of people mainCtrl.People. Each person has an array of telephone numbers.
index.html
<div ng-repeat="people in mainCtrl.People">
<ng-person ...
0
votes
0answers
31 views
How do I load multi-tier data using AngularJs?
Having trouble loading n-tier data via Ajax requests.
I first load my applications using Ajax and render them to the screen (works). After they have been loaded, I need to load child data based on ...
0
votes
4answers
65 views
calculate the sum of values in ng repeat Angularjs
I am new to Angularjs. I am displaying list of items using ng-repeat. how to calculate the sum of it? is there any simple method to calculate it in html using expression?
name numberofyears amount ...
0
votes
1answer
21 views
Select Option set default value from list if value match using angularJS
I have html.
<select ng-model="user.role" class="form-control" name="role" >
<option value="">Select Role</option><option ng-repeat="role in roles" ...
0
votes
3answers
38 views
How to add image in dropdown in angularjs
I am working on dropdown with image in angularjs, i tried many solution but havent get any success.
My combo data is coming in json format with three elements id , image and value.
These dropdown ...
0
votes
1answer
32 views
Initiate dynamic form values within ng-repeat
Trying to figure out how to update my dynamic form process to angular. Pre-angular I would pass a function into the template context. Within a jade loop I would pass the values into the function ...
0
votes
2answers
46 views
AngularUI view not updating after model changes
Beginner question on AngularUI updating a view after the model changes. I have a list of recipes and each recipe has a list ingredients. After a $http GET for ingredients, my nested loop isn't ...
0
votes
2answers
28 views
:first-child with ng-repeat
I have an ng-repeat and only want to apply a style to the first div with the class type in the ng-repeat.
<div class="my-list" ng-repeat="item in list">
<div class="type">
...
0
votes
2answers
24 views
ng-class-even not applying class
So I'm trying to zebra stripe my ng-repeat so the rows can be easily distinguished.
I think I have everything wired up correctly, but the classes just aren't being applied.
I've created a plunker ...
0
votes
0answers
8 views
items are cramped on top of each other when using angular-masonry directive to create layout
Am using angular in this simple search results page and instead of adding jquery masonry for layout and deal with timing issues I decided to give this directive a try since it plays nicely with the ...
1
vote
2answers
23 views
How to show part of text, and then click to show the rest in AngularJS
I have some text rendered through AngularJS.
It's rendered this way:
<div>{{itm.Comment}}</div>
What I need to do is to show the first 40 characters of the text, and then there should ...
0
votes
0answers
7 views
How to do pagination in tree-grid-directive?
I am using following ‘tree-grid-directive’.
https://github.com/khan4019/tree-grid-directive
Is there any way to do client/server side pagination in tree-grid-directive? Or Is this support ...
1
vote
1answer
28 views
how to access json data with special character in key in json in angular js
I want to access data with key name as
[Measure].[item0] as the key names and when i access this in my html it gives error
like json is ine format "[Measure].[item0]":"45"
my code for accessing this ...
2
votes
1answer
34 views
Error in fetching records in angularjs
I am Trying to make code for fetch records in angularjs but didn't get any solution please help me
<div ng-app="" ng-controller="customersController">
<ul>
<li ng-repeat="x in ...
0
votes
0answers
33 views
AngularJS scope data not displaying on partial html
I am facing one weird scenario while using angularJS. [new to AngularJS]
I am calling one function from my index.html which is defined in controller.js.
<li><a ng-click="casualShirts()" ...
2
votes
1answer
18 views
Angular JS Multiple filter with single ng-model / input
How to make a single Search to filter multiple objects value ??
For e.g: if i search '1' OR 'one' then the result should come........
I've tried it so far:
HTML:
<input type="text" ...
0
votes
1answer
38 views
Angular Ng-repeat setup
I'm trying to use ng-repeat and ng-show to split up data into two columns
<div class="col-md-4">
<div class="row" infinite-scroll="eventSearchService.getMoreEvents()">
<div ...
-1
votes
1answer
23 views
ng-repeat on a multi-dimensional array/object
I am getting json object from an external url.
$http.get('http://dev-newsbackend.gotpantheon.com/articles')
.success(function(data, status){
$scope.articles = data.articles;
...
0
votes
1answer
20 views
ng-repeat binding with ng-model seems broken in AngularJS 1.3 but works in 1.2
I was trying to upgrade my project to use AngularJS 1.3 (RC0 as of writing) but a portion of my code that works in 1.2 but doesn't seem to work at all in 1.3. Unless I misunderstood the concept of ...
0
votes
2answers
28 views
AngularJS - Calculating length of JSON array
I have a set of JSON data and within it, i am trying to calculate the length of an array (Infos):
My JSON:
"Association": {
"Items": [
{
"AssocName": {
...
-1
votes
3answers
47 views
angularjs filter on nested objects
I am quite new with angularjs so I am not sure if what I am trying to do is the right way. Basically I want to display in my page a nested object, and a filter, this way the user can easily type ...
0
votes
1answer
17 views
Update directive's template on controller's variable change - angularjs
What I'm trying to do is to get a JSON object from a $http request, requested inside a controller, and build a directive that displays the multiple objects in the JSON object in a grid.
The problem ...
0
votes
1answer
28 views
AngularJS directive for accessing ng-repeat scope of child
Okay, so let me start off saying that I have a directive that creates a JQueryUI tab setup with a backing field that populate the tab name and the tab contents basically.
<div ...
0
votes
1answer
15 views
Filtered Dropdown (using select) With Accumulated Totals (ng-repeat)
Hoping someone might be able to shed some light on my problem. I have an AgularJS dropdown list that displays a number of Users. Depending on what user you select, it will show some data which is ...
0
votes
1answer
31 views
AngularJS: how put correct model to repeated radio buttons
I think I have some sort of special code here as all I could google was "too simple" for my problem and it also didn't helped to come to a solution by myself, sadly.
I got a radio button group of 2 ...
0
votes
1answer
28 views
ng-repeat over custom directive with isolate scope
I though that this might be a duplicate of this question, except that I'm not using primitives in my code. I have a directive that I'm using to place inline svgs dynamically into my view. It works ...
0
votes
1answer
45 views
Non convoluted method to add a new line after ng-repeat
How do you define what's being put after (or between) ng-repeat elements?
Clearly instead of
<div>
...
0
votes
1answer
77 views
Create a list without ngRepeat
I would like to create a directive, that does not need ngRepeat, because there is some additional functionality on the directive, that doesn't play good with ngRrepeat.
This is my directive with ...
1
vote
1answer
47 views
Pass parameter to Angular ng-include
I am trying to display a binary tree of elements, which I go through recursively with ng-include.
What is the difference between ng-init="item = item.left" and ng-repeat="item in item.left" ?
In this ...
0
votes
3answers
424 views
Angular - ng-repeat filter when value is greater than
I have a simple ng-repeat that throws out data, one of fields it displays is NumberOfStamps:
<tr ng-repeat-start="list in Data.Items ">
<td><a href=" {[{list.Title}]} ...
7
votes
3answers
5k views
In Angular, how to pass JSON object/array into directive?
Currently, my app has a controller that takes in a JSON file then iterates through them using "ng-repeat". This is all working great, but I also have a directive that needs to iterate through the same ...
8
votes
1answer
9k views
AngularJS 1.2 - ngAnimate not working
I am new to using ng-animate with AngularJS 1.2. I am not sure why my ng-animate does not work a certain class name but works with the default for a simple fade in that I saw in an example.
In ...
1
vote
1answer
281 views
Angular orderBy evaluate expression
I would like my orderBy to evaluate an expression
Currently I have:
ng_repeat: "post in posts | orderBy:"up_votes"
I would like it instead to order by {{up_votes - down_votes}}
47
votes
13answers
28k views
Way to ng-repeat defined number of times instead of repeating over array?
Is there a way to ng-repeat a defined number of times instead of always having to iterate over an array?
For example, below I want the list item to show up 5 times assuming $scope.number equal to 5 ...
33
votes
2answers
14k views
Directive isolate scope with ng-repeat scope
I have a directive with an isolate-scope (so that I can reuse the directive in other places), and when I use this directive with an ng-repeat, it fails to work.
I have read all the documentation and ...
18
votes
5answers
12k views
Binding inputs to an array of primitives using ngRepeat => uneditable inputs
Here is a demo to my problem.
$scope.myNumbers = [10, 20, 30];
<div ng-repeat="num in myNumbers">
<input type="text" ng-model="num">
<div>current scope: ...
82
votes
3answers
39k views
How can i iterate over the keys , value in ng-repeat in angular
In my controller , i have the data like
$scope.object = data
Now this data is the dictionary with keys and values get from the json
I can access the attribute with object.name in template
Is ...