Tagged Questions
0
votes
0answers
18 views
ng-class is not applied on element with ng-repeat
I have the following custom directive:
angular.module('Interfaces').directive('Interfaces', function() {
return {
restrict : 'A',
scope : {
minor : '@'
},
templateUrl : '...
0
votes
1answer
25 views
AngularJS: Cloning element containing ng-repeat
I am creating a directive with Angular 1.6 which creates a fixed header for a table. I am trying to achieve this by clone the table header and fixing this. This all works fine in most of my tables. I ...
0
votes
1answer
41 views
ng-repeat filtered by object of previous ng-repeat
I have this structure, but i don't know how can I filter a ng-repeat content with an object of previous ng-repeat iteration.
//#########################################################################...
1
vote
2answers
34 views
How to pass ng-repeat filtered list to custom directive
I'm trying to pass the result of an ng-repeat with a filter into a child directive, but I am getting an infinite digest cycle error.
Plnkr
HTML
<!DOCTYPE html>
<html>
<head>
&...
0
votes
2answers
36 views
Binding bulk records to the select dropdown with infinite scroll using angularjs
I have millions of record which I need to fetch and bind it to my select dropdown in my angularjs application. But, as we know obviously it'll cause the performance issue. So I'm looking for the ...
0
votes
0answers
23 views
how to show multi array data in my console log
i am new in angularjs and mongodb please check below data and code.. i want to show data in console log but its show undefined i don't know why, i was try many times but does not success please guys ...
0
votes
2answers
40 views
Modal is showing first element in array of angular ng-repeat
This Html code helps in repeating out the company profile in a card-block.
<div class="container-fluid" id="gallery" ng-controller="ComController" style="padding-top: 2em;">
<h1 class=...
0
votes
3answers
40 views
ng-repeat or something similar on two arrays
I recently started learning angular js. I have following object ResultRow:
ResultRow = function ( cars, prices) { //cars and prices are arrays
this.prices = prices;
this.cars = cars;
...
2
votes
2answers
59 views
ng repeat on a array to filter a key on another object to get the associated value and use watch on that value
Let say i have a object called,
scope.rec = {a: 2, b: 3, name: a,b};
And i split the "name" key like scope.x = scope.rec.name.split(","); then scope.x will become an array.
Now i need to iterate ...
0
votes
0answers
26 views
AngularJS Three Order of rowspan dynamically
I am a beginner in AngularJS. I need to do Three order of rowspan dynamically. I have referred the below URL:
AngularJS Third Order Nested Table Structure
But still it is very difficult to make it ...
0
votes
0answers
61 views
Ng-repeat on wrapper of multiple options inside <select> cause the options to receive null
so what I want to accomplish is populating a select element with a recurisve json, like so:
[{
"siteId": 1,
"name": "Test 1",
"siteTypeId": 2,
"childSites": [
{
"siteId": 3,
"...
0
votes
2answers
336 views
How do you use ng-repeat with a directive/template?
I'm trying to use ng-repeat to iterate over an array I've defined. This would write out a custom Element, which has a Directive/template to replace it's HTML.
When I don't use ng-repeat, the custom ...
1
vote
3answers
102 views
ng-repeat doesn't work when HTML is altered under $compile
Directive code:
.directive('replace', function($compile) {
return function (scope, element) {
element.html(element.html().replace("Hej", "Hey!"));
$compile(element.contents())(...
0
votes
3answers
29 views
how to bind the unique value for Domicile Name from json into the Dropdown in angularjs
Array is this:
$scope.domicile = {};
$scope.domicile.users = [
{ DomicileName: 'European', PortFolioName: 'nternational Select x EM ADR', Alias: 'ADR x EM', Percentage: 1.0, Ticker: 'ADR', ...
0
votes
2answers
81 views
Angular JS ng-repeat not working as expected
I have a controller like this:
controller('BreadCrumbs', ['$scope','crumble','$rootScope', function ($scope,crumble,$rootScope) {
function init (){
$scope.ui={};
$scope.ui....
1
vote
2answers
180 views
dynamic ng-model using multiple dropdown and ng-reapeat
Hello every one i have a language multiple selection input. On select language i need to open textboxes of selected language with dynamic ng-model.
this is my json and code.
[{"id":"1","lang":"...
0
votes
0answers
137 views
angular 1.6: ng-blur and ng-focus does not work on elements in ng-repeat
So I am working using angular 1.6 on an application. Using ng-click and ng-focus has worked fine in the past on different elements. However, I found I am having trouble getting it to work within ng-...
0
votes
1answer
111 views
Angular.JS ng-Repeat in directive runs twice
https://plnkr.co/edit/WzLez5XElbOHRTvXEJFc?p=preview
function DirectiveController($scope, $element)
{
$scope.Array = ["a", "b"];
$scope.me = function() {
console.log("i ran");
};...
2
votes
1answer
78 views
Update element created by directive on change of controller varibale
I am trying to create an angular app where user can create a dynamic form. In this user can create form fields and save form metadata, which is then used to display actual form. There is live preview, ...
0
votes
0answers
33 views
Not able to get data-bound data during the directive initialization when its wrapped in a ng-repeat
I've been creating a modularized start page (In Angular).
I've created a module-directive that can handle simple data and displaying them as a list.
Originally, my plan was to create new directives ...
0
votes
0answers
90 views
$compile directive not hiding elements in ng-repeat
After upgrading from Angular 1.3.2 to 1.5.11 it appears my custom restrict directive is no longer working as expected. The directive is responsible for hiding elements through comparing a user's roles ...
1
vote
0answers
105 views
Angular dynamic directive attribute not evaluating when used with ng-repeat
I'm trying to pass in a string that comes from a list in my controller which contains the template name that should go get the template dynamically (i.e. template="{{item.template}}")
I've attempted ...
4
votes
1answer
123 views
AngularJS - Filter already selected items from ng-select inside ng-repeat
I've found similar questions but no one is having the same problem I'm having. I have a list of localizations that a user can add to (for building their own localization of our UI). They can have ...
1
vote
1answer
197 views
Angularjs: Compile ng-repeat dynamically
I have found some strange behavior with Angularjs. My directive simply adds and compiles ng-repeat to my dom element. However the scope variable item is not accessible. Look at the code below for ...
0
votes
0answers
26 views
md-select rtl with special character issue
I have a list with one of value starting with special character '@'.
$scope.neighborhoods = ['john','adam', '@jhonny'];
This list is used in md-select with direction: rtl. but in display the special ...
0
votes
5answers
117 views
How to make angular select to select a selected value
I have selected value coming from back end in JSON and i have select element content coming from back end in the same JSON also.
Problem is that selected value is not selected in the select element, ...
0
votes
1answer
23 views
AnguarJs: ng-repeat only work after clicked button inside directive
I want to bind an array (customLayers) and use it for ng-repeat.
I fill the array inside the kv.colorMap Object.
I have three directives using these technique. But the directive updates the binded ...
0
votes
1answer
35 views
How to use ng-repeat to show a templateUrl
How to use ng-repeat to show a templateUrl?
Hi guys i tryied some ways in order to show all elements of a templateUrlby using ng-repeat butunfortunatelly i didn't figure it out!Anyone who can help me ...
0
votes
1answer
51 views
dynamic template adds empty value on ng-repeat
I have been trying to make a query builder for my own purpose.
This plunker https://plnkr.co/edit/95VgJfH9nIScwApXyKOu?p=preview has my work so far,
When I select a parameter and Click on add, it ...
0
votes
2answers
63 views
ng-repeat not rendering array changes in the controller
I have a list of items being displayed on a page using ng-repeat. Below is the html.
<div class="container-fluid">
<div class="container" >
<div class="page-header">
&...
0
votes
3answers
33 views
How to ng-if use when its value is “”?
How to use ng-if? I have below code. If image_path not null show td otherwise not. My code does not work.
ng-if="hs.image_path != """
<td ng-if="hs.image_path != """><img id="...
0
votes
1answer
950 views
Is any alternatives of ng-repeat in Angular.?
I am working on a web-app, using Angular.js. I need to process huge data on many places. ng-repeat is taking too much time to process data i have thousand of data in my array, it's so time consuming ...
1
vote
1answer
114 views
nested ng-repeat in angular js not showing anything
i am having this inside my controller method.
var employee = [{name:"ankur",dept:"IT",company:"wipro",under:[{name1:"ashish"},{name1:"akash"},{name1:"tyagi"},{name1:"mogra"}]}];
$scope.employee = ...
0
votes
2answers
74 views
How to sort by descending datetime ng-repeat in Angularjs?
I want to sort my data by descending date, ie 27, 26 , 25 .... How to do this?
<tbody class="gradeX" ng-repeat="x in Profile | orderBy: x.created_datetime">
<tr>
<td>{{x....
0
votes
0answers
45 views
Custom 'compile' directive renders ng-repeat multiply times
I am using a custom "compile" directive to render HTML snippets that I push into a div container which is working great. One problem I am having is that it seems like the compile directive gets called ...
0
votes
1answer
53 views
Select option goes beyond display
i am using select tag to show a dropdown. in option tag i am doing ng-repeat. if in that ng-repeat, there is a long string suppose of maxlength=255, how can i break into lines. because it ...
0
votes
1answer
73 views
Getting the sum of all values in object - ng-repeat
I feel like I am missing something basic here, and would love some help.
I have some data that looks like this
"playerPoints"{
"ted":{"military":3,"gold":2},
"bill":{"military":2,"gold":4}
}
...
1
vote
2answers
39 views
Passing scope parameters to a Custom Directive as ng-src is being called repeatedly
My current implementation is shown below which is working but as the getImage method is inside expressions its being called repeatedly when any text change or data is entered on the page
HTML
...
0
votes
1answer
176 views
AngularJS using ng-show within ng-repeat
I have created a menu using ng-repeat, that I need associate the appearance of (ng-show) "Setup" with a click on the menu item, the difficulty is that the menu and "settings" are two different ...
1
vote
1answer
47 views
data iteration in directive for org chart
Here a plunker which have css based Organization Chart, i am tring to make it dynamic in angular js plunker_angular js, i am new to custom directive,
is there any way to itrate my $scope.data with ...
1
vote
1answer
102 views
AngularJS ng-repeat issue and add row dynamically on button click
I want to create a simple form with some nested data. When I click the addSite() function, I want to create a new Site item and append it to my $scope.info.
I cannot create more than one form and the ...
0
votes
1answer
73 views
Angular ng-messages inside custom directive inside ng-repeat wrong behaviour
I have same problem as described in this toppic:
Angular JS ng-message inside directive
Unfortunatelly that solutions is not working for me, because I am using my custom directive inside ng-repeat. ...
0
votes
0answers
34 views
how can get ng-model value within ng-repeat on directive?
I want's to get the value of ng-model within the the ng-repeat on my own directive and use the value of that ng-model in the directive for a fuction.
here is a plunker to see code in action :
https:/...
2
votes
4answers
137 views
Conditionally add attribute directive to the ng-repeat
I would like to know if its possible to add attribute directive to some elements inside of ng-repeat. I have tried checking CSS class or id but without luck.
Example code
class ItemNavigation {
...