0
votes
1answer
26 views

How correctly make a select ng-repeat into another ng-repeat

I have to write something like that <table> <tr ng-repeat="pers in persons"> <td> <select id="person{{pers.id}}"> <option ng-repeat="city in ...
0
votes
1answer
28 views

Access ng-repeat scope within controller function

Say I have <div ng-repeat="i in items"> <span ng-show="editing">i.something</span> <span ng-show="!editing">i.something</span> <a ...
0
votes
0answers
21 views

ngClass is not updated successfully in a directive

I have created a directive, that creates a popup with a ul element, but ng-class = isVisible is not returning the correct value. It works, if I only have one use of the directive at my page, but when ...
1
vote
1answer
17 views

angularjs compile and link dom recursive manipulation

I've been working with angular for a month or so now. I'm having an issue working with dom manipulation. As an exercise, I want to create a directive that would repeat a nested object to a tree view. ...
1
vote
1answer
21 views

Wait Until All Animations Complete Before Removing From DOM with Angular Animation

I'm using the staggered feature for Angular animations (https://docs.angularjs.org/api/ngAnimate#css-staggering-animations). Is there a way that I can use this and also have the items not be removed ...
1
vote
1answer
27 views

Displaying json file to the view with $http in angularjs

I’m new to angularjs (and programming). I’m trying to display a json file to my view (home.html) with $http and ngRepeat but it does not work. When I inspect angular responses, I see that there are ...
0
votes
1answer
27 views

Too many iterations in filter

I create a filter to get the name of a building by id: app.filter('getBuilding', function( APIService ) { return function(input) { var buildings = APIService.query({ route:'building', ...
0
votes
0answers
23 views

AngularJS track by expression for lists that can add and remove items

Is there a nice way to use the track by feature for ng-repeat with editable lists, i.e. lists where the user can remove and add items to? Existing objects already have a unique ID assigned while a ...
0
votes
1answer
10 views

Angular js - pop up value not reflected in ng-model, and not able to close

I am trying to add the mark details of student and the teachers comments about the student using angular js, as below. I have inlcuded pop up component from my controllers.js at run time based on ...
-1
votes
1answer
28 views

ng-repeat vs ng-options which is best for me

i have to display the JSON data in drop down list ,for that i have two options one of the options is By using ng-repeat and other one is ng-options. ng-repeat code : in html file : <select> ...
0
votes
1answer
22 views

using ng-repeat to create select list loop

I have an array of values and I want to create a select list for each one. Then I also want to add a button that will add a new select list with nothing currently selected. I'm not sure how to ...
0
votes
0answers
13 views

AngularJS grid formatting after Group By Directive

I have a set of data with group title attribute and am able to group and display them using this solution: AngularJS Group By Directive However, I would like to display them in grid format (3 ...
0
votes
2answers
52 views

ng-repeat for a 3+ levels deep hierarchy

I wonder if there's a sane way of ng-repeat-ing in a multilevel structure. Imagine data like this top middle 1 2 middle 3 4 5 top middle 6 middle 7 8 9 Displaying then as an HTML list means N ...
0
votes
1answer
20 views

Angular JS - on page load - arranging array in ascending order

Is there a way that I can arrange a simple array like below: <div ng-init="fruits=['apple','orange','mango','banana','pineapple','kiwi']"> in ascending order on page load I tried this, but ...
0
votes
1answer
14 views

ng-repeat only objects with specific property value - custom filter?

So say I have a JSON object 'user' with some basic properties like: 'name', 'address', 'role', etc. I want the ng-repeat to only spit out the objects in which the property 'role' equates to ...
0
votes
0answers
34 views

AngularJS: $scope.array.push() does not update the view, even with $apply

I'm trying to learn AngularJS and there is this thing that I don't understand, which seems like all the internet solved by using $scope.$apply, but I already use it and it does nothing. Basically, I ...
1
vote
2answers
45 views

Dynamically Create and Load Angular Directive

In my application i have a list of custom directive names. $scope.data =["app-hello","app-goodby","app-goodafter"]; each name in this array is one directive that im created. var app = ...
0
votes
1answer
40 views

ng-repeat not printing anything

I have the following scenario: app.controller('ResourceController', function($scope, $sce){ var resourceData; $scope.data = ''; $scope.loadResources = function(){ ...
0
votes
0answers
57 views

Angularjs Service Scope + Bindings

I am looking to run the following controller but im having trouble with scope. I have a service that calls two functions that retrieve meta data to populate scope variables. The issue is that ...
0
votes
1answer
36 views

AngularJS using $sce.trustAsHtml with ng-repeat

I'm trying to use $sce.trustAsHtml() with a property of an object in ng-repeat. The result is that the HTML is totally blank. The HTML outputs correctly using ngSanitize though. <div ...
0
votes
1answer
24 views

paginate ng-repeat items which are filtered using filter:query

I am trying to filter|query on a list of items in angular which are paginated. The problem is the filter|query works only on the paginated items, but I would like to paginate only the filtered items, ...
0
votes
2answers
36 views

Set value in HTML with AngularJS

I'm using Angular JS. I loop out a part of a scope that from the start is a JSON array. I need to check for if a value in that array exists. If it does it should do something. The following code work ...
0
votes
1answer
15 views

Not able to display data in tree format using nested ng-repeat in AngularJS

I have written this HTML to display my data in tree format, but its not working as expected. What is the issue here. I know I can use custom directive to do that, but I just want it to show in very ...
0
votes
1answer
23 views

Get the html element form $scope, that ng-repeat created from $scope?

Is it possible to get the html element (for styling) from the $scope object? I'm using an ng-repeat on a $scope.array and I know that $scope.array[0] corresponds to the first element in the HTML ...
0
votes
1answer
24 views

How to expand/collapse all rows in Angular

I have successfully created a function to toggle the individual rows of my ng-table to open and close using: TestCase.prototype.toggle = function() { this.showMe = !this.showMe; } and <tr ...
0
votes
0answers
18 views

Angularjs: how to Call method in Controller while submitting the Form

Actually In my form page of Angularjs, have two submit buttons i.e In one field set i have one button for update and another button at the outside of all field sets for submission of whole page. Code ...
0
votes
1answer
26 views

AngularJS search filter with other filters

I have a code below: <input type='text' ng-model="search.$"> <li ng-repeat="item in items" |filter:isExpired | filter:search>{{item.name}}</li> Currently, items has a boolean ...
0
votes
2answers
20 views

What would be the best way to track by $index in nested ng-repeat?

I have the following HTML: <div class="row" ng-repeat="row in grid track by $index"> <div cell class="cell" ng-repeat="cell in row track by $index" ng-click="game.addItem($index, ...
0
votes
2answers
21 views

How to change filter action when there's no input?

I want to make a typeAhead in AngularJs, and following this tutorial I have made it most of the way. The only thing that it doesn't do for me is that I want the whole list to show up when you first ...
1
vote
2answers
36 views

AngularJS Accordion Expand All Collapse All

I am trying to get the accordions to toggle correctly through the directive ng-click. If I have Item one open how do I get it to expand all the accordions? Item two and Item three will continue to ...
0
votes
1answer
14 views

Use a function with arguments in angular expression

I need to dynamically set a CSS value from inside ng-repeat so I tried this, but it doesn't work: style="right:{{ getProgressPercentage(value) }}" The value is part of the ng-repeat: ...
0
votes
0answers
16 views

slide toggle from left to right in angular js

I am using hide and show an element using the angular JS . Angular toggle collapse working fine from slide up and slide down. How can I do the same thing sliding from right to left with some ...
1
vote
1answer
20 views

AngularJS getting data from item where

When an item in the list is clicked, an ng-click fires with the id of the item sent, the idea was to get the description of the item to match the id but it seems to only be picking up the index of the ...
0
votes
0answers
18 views

Data assign through service not updating in Angular JS

I wrote a service to share and update Datas between controller myApp.service('Physician',function($http){ var physicians = []; var refresh = function(fetch) { physicians = [] $http({ url: ...
0
votes
1answer
41 views

AngularJS - ng-repeat not working with a map-entry named length and value 0

I would like to show Events with Subevents I got from an API as JSON [ { "class":"de.ff.prg.EventItem", "id":27667, "additional_info":null, "comments":null, "event":{"class":"Event","id":27657}, ...
1
vote
0answers
27 views

Performance Tuning Angularjs ng-repeat for large lists

I have an angularjs directive I have written that acts like a form select component. It has a search field to search through the choices. When you click on a choice it removes the choice from the list ...
-1
votes
1answer
43 views

AngularJS scope not binding data in ng-repeat

I am developing a single page application which retrieves blog feeds from a website. I got JSON using jQuery AJAX, and assigned the value to the "$scope.entries" variable, but its not reflecting the ...
0
votes
2answers
29 views

angular ng-repeat if property is defined

I'm trying to ng-repeat through an array, but need to hide if a property is undefined. I tried doing to do is this: <div ng-repeat="person in people | filter:search" ng-if="last == undefined"> ...
0
votes
2answers
37 views

How to sort a 1:1 object map in Angular JS ng-repeat

Is there a way to sort a 1:1 object map in angular.js using filters (or any other method) within a ng-repeat block? I have: obj:{ a:3, c:5, d:1, g:15 } Essentially I'd like to ...
1
vote
1answer
24 views

Custom search filter for AngularJs

Let suppose I have an array of strings like ["don't worry", "worry", "Always be happy and don't worry" ] When I search for worry,using default search filter on ng-repeat, it gives me all three ...
0
votes
0answers
35 views

AngularJS - ngclick on 2 clicks not working

I am trying to implement a simple ng-click for when a user clicks on a link in the first instance something is shown, in the second instance, the same thing that was shown is now hidden. Here is my ...
0
votes
4answers
42 views

apply css on ng-click dynamically angularjs

I have an Object like this var obj = [ { 'id':1, 'color':'#ff0000', 'name':'final' }, { 'id':2, ...
0
votes
1answer
18 views

AngularJs ngSwitch with ngRepeatStart / End

I'm tring to figure out how I could us the ngSwitch with ngRepeatStart and End on two table rows, where second row is only shown when you click on the top one. Here's what I've got and want to make ...
0
votes
2answers
25 views

Adding table row underneath each table row generated by ngRepeat

I'm using ng-repeat to populate a table with data. This is how I have it setup: <tbody> <tr ng-repeat="client in clients | filter:x | filter:y |orderBy:predicate:!reverse | itemsPerPage: ...
0
votes
1answer
30 views

Angular : how refresh list after modal use?

i have an employee list (ng-repeat), i can update employee info with modal. but when i click on save button, the list is not updated (i must press F5). I try to use $watch but without succes there ...
0
votes
0answers
13 views

AngularJS - Smoothing $anchorScroll();

I have a number of areas on my web app where i have introduced $anchorScroll(); The actual functionality works has expected, in that, on click of a link, the user is moved to the corresponding ...
0
votes
1answer
12 views

Order List Dividers Based on Custom OrderBy Function

Please see the CodePen below for clarification. I have a situation where I need to order the list dividers based on a "ParentId" field that is in each child of the parent. I have an array of ...
0
votes
0answers
19 views

Directive works with TemplateUrl but not Template

This is a strange one. I am new to angular, only been learning for a week or so. I have two directives. The first: app.directive('block', function() { return { restrict: 'E', ...
0
votes
0answers
14 views

Sort column headers and body together in angularjs

I'm trying to create a totally dynamic table with AngularJs... However Im a bit stuck on syncing the table header sorting with the table body sorting. So the idea is that a user will be able to ...
-1
votes
1answer
62 views

Disable items in ng-repeat list on click of one other item

Here is my plnkr with my progress so far: http://plnkr.co/edit/iEHMUMlASZaqdMQUeF7J?p=preview I'm having problems implementing the following functionality however. When an item on the list is ...