0
votes
1answer
23 views

$watch on directive with isolated scope for nested object as property from crossfilter

I have created a directive with isolated scope, element, and am using those values passed in to build d3/dc charts. So I have some data that is put through crossfilter on the $scope, so that the ...
-1
votes
1answer
43 views

AngularJS textbox value undefined

I have created a directive wherein it copies the value of textbox1 to textbox2. function myCopyText() { return { restrict: 'A', link: function(scope, element, attr) { ...
0
votes
0answers
12 views

Tabindex in AngularJS directive

I have written a directive which produces a table including some rows. Each row has some drop-down list for selection and also some normal text areas to fill information. The problem is, when I hit ...
0
votes
1answer
19 views

Table styling with LESS

This question is about styling a table which is created inside an AngularJS directive. I have an array of objects passed to the directive from HTML file. The directive creates a table and shows each ...
0
votes
0answers
15 views

Angular js 1.5 + emit listener not working

Facing random issues with Angular Js Listener : data is being emitted by rootscope.emit event in service on a particular id Same data is not being listen by listener on root scope into controller ...
0
votes
1answer
21 views

How to generate random div id inside Directive?

I'm attempting to render 2 charts using a directive. The chart requires a unique target div to render; however, it appears my directive is generating a single instance of the control and not a second. ...
1
vote
1answer
22 views

Decorating directive with unnamed link function

How can one derocate directive if link function is not named. More specifically I want to decorate select-ui directive. This is how their directive is defined: .directive('uiSelect', function() { ...
1
vote
1answer
11 views

Wrap some components in a custom div in Angular Schema Form

How can I wrap some elements in a div like tabs, but in a div with custom classes?
0
votes
1answer
50 views

How to access parent scope in directive on nested ng-repeat

Simple question but i unable to find why in this template, the format-property directive can not access to device? <table> <tr ng-repeat="device in devices"> <format-...
0
votes
0answers
14 views

Data update fails for a D3.js chart Angular directive

For a front-end project I need to visualize data in a histogram format. I want to use a custom reusable D3.js chart for this. The frontend in written in Angular 1 and for the chart an Angular ...
0
votes
1answer
23 views

AngularJs- Form validation directive. The password confirm is always invalid

I have signup form in my ionic app (the code available here), the signup view has it own controller. the password confirm has a Directive to check the match with the main password. the register button ...
0
votes
0answers
13 views

Angular Directive - Adding an anchor dynamically the click doesn't fire in Internet Explorer

I have the following directive code that creates an anchor tag with the purpose of downloading some csv content. It works well in both Chrome and Firefox but not in IE 11 or Edge. Is there something ...
0
votes
2answers
22 views

Angular directive compile: “RangeError: Maximum call stack size exceeded”

I want to add an 'ng-pattern' directive to an input element through a custom directive. I don't want to do it in the templates directly, but it looks I'm getting in a infinite loop. I tried to set ...
0
votes
1answer
18 views

How to recompile directive's content

I want to add an 'ng-pattern' directive to an input element through a custom directive. I don't want to do it in the templates directly, but it looks the element is never recompiled. Any ideas? Thanks ...
0
votes
0answers
24 views

AngularJS - Cannot change directive template dynamically in link function

I want my directive to dynamically change its template by watching a string received as attribute from the parent controller, so I used $compile from this answer together with $observe from this small ...
0
votes
2answers
39 views

How can a link function and controller function share knowledge in an angular directive?

I have an angular directive that shows payment history. By default, it shows the last 6 payments using the vm.numberOfPaymentsToDisplay variable. If you click view more, it adds 10. Now, when a user ...
1
vote
1answer
28 views

How to mark all checkboxes in AngularJs in custom table?

I have this table in angular that I send her data and it shows it, deepens on the data. I also add cheackbox input that i want when i click on it he mark all the checkboxes, but he doesn't work very ...
0
votes
0answers
6 views

How to generate the custom id in firebase using Post method with angularjs

I am using POST method to post some user data , for example I am making a database which have Shipping Cart, Shipping Address and User Id. So I just want to remove all random keys which will generate ...
0
votes
1answer
35 views

AngularJS directive: $timeout alternative

I'm using angularJS 1.6 directive to add some jQuery libs. Now i'm using it so: let SomeDirective = function ($timeout) { 'ngInject'; return { restrict: 'A', link: function (scope, ...
0
votes
1answer
35 views

Disable button after click in angularjs

I created a generic dialog box directive which I am using to display forms like create, edit, delete etc.. It works perfectly but now I need to disable "create" button unless I receive a response ...
0
votes
0answers
29 views

How to validate fields in a form based on checkbox selection?

I'm having a customer form, where users can enter their contact details. And also there is checkbox for alternate contact details. I have to validate all the required fields in both sections. I have ...
0
votes
3answers
29 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
1answer
27 views

Angular - Error: $rootScope:infdig when setting a directive attribute using a controller variable

I have a directive that prevents certain values from being entered into an input. For example this... <input type="number" name="testValue" ng-model="testValue" block="[0, 10, 17]" /> ......
1
vote
1answer
40 views

How to generate table with Angular ng-repeat using a JSON Map response

I need to generate a table as listed below using two APIs with Angular ng-repeat? How do I achieve this +---------------+---------------------+------------+------------+ | Continent | Continent ...
0
votes
0answers
9 views

Error: $compile:multidir Multiple Directive Resource Contention

I have a simple directive that renders a select field on the view. I get the error below. When I remove the "replace:true", it works well. Error: $compile:multidir Multiple Directive Resource ...
1
vote
1answer
28 views

AngularJs Inject multiple directives from separate files into one common module

there is a question regarding referencing and injecting directives into different modules. The goal is to inject multiple directives located in separate files into one module, and then inject that ...
0
votes
0answers
26 views

attaching an angularjs directive to “bootstrap select”

I am using bootstrap select widget in my angularjs app. I have a repeated pattern where I need to have the same select element in multiple forms. So I thought why not create that as a directive. The ...
0
votes
0answers
27 views

angularjs: how to use a http url as templateUrl in angularjs directives

I want to use a http url as templateUrl in my angularjs directive like below: angular.directive('mydir', function() { return { restrict: 'E', link: function(scope, element, ...
0
votes
0answers
41 views

how use a directive multiple times?

I have this rating directive that I want to use a multiple times and have it return different values selected. But the problem I'm having is that on page1.html is that both directives are returning ...
0
votes
1answer
30 views

How to find height and width of element passed to Directive's link function in Angularjs

I cannot find the height or width of the element passed to the 'link' function. I need it because I want to calculate the position of a mouse click on an image appended to the element. offsetHeight, ...
0
votes
0answers
18 views

Rename require ngModel in Angular directive

I have developed some directives and in them I use a certain pattern for naming attributes. All of the attributes are prefixed with "fs-" for example <div fs-attrtibute="value"></div> Is ...
0
votes
2answers
24 views

Angular directive to detect scrolling within an ng-repeat container

In my Angular app, I've created a simple directive to do something on scroll, based on the answer provided to a similar question here. Here is the code to my onScroll directive: (function() { '...
0
votes
0answers
34 views

Custom directive not working whenever moving to other page

I have a simple setcalender directive on one page and it works fine. However, if I go to another page and then come back, the calender doesn't show up anymore. Below is the directive code. Am I ...
0
votes
0answers
25 views

change attribute of DOM on change in scope variable

I want to disable all the elements of form depending on change in scope variable. html is as follows: <form class="col s12 nopadding" name="localizationForm" contents-disabled="{{isReadOnly}}" ...
0
votes
1answer
19 views

Angular Directive: Button Spinner

I have created a directive, its behave like when you click on button it will show spinner or loader, its show user there is something in progress like API call or moving to another page, I am facing ...
1
vote
2answers
38 views

Angular JS Custom Directive not working as element tag

I'm playing around with basic Angular JS stuff. I thought I knew custom directives pretty well but I'm only able to get them to show up in the template if I use them as element attributes. And I'm not ...
0
votes
0answers
14 views

AngularJS angular-inview video play

I am pretty new with Javascript but would like to add autoplay to videos in view. Below is my test where I am able to add and remove a play class with angular-inview. Thanks for any help. <body ...
1
vote
2answers
32 views

How to make data inside a particular item show while using ng-repeat in angularjs?

I'm trying to make a quiz application with angular js. When a user selects the correct answer i want to show an icon inside that item. Problem is that icon is beign applied to every item in the list. ...
0
votes
1answer
16 views

Directive not refreshing after scope change

I have a custom directive to apply background-image on elements and I want it to refresh UI on scope changes. After reading how to do it I added $watch to observe scope changes, but I was using the ...
1
vote
0answers
37 views

Angular Google Maps not refreshing after type change

I'm trying to change dynamically the type of the map, but it doesn't refresh. This is how I created the map in html file with the change type button <button ng-click="trackCtrl.changeMap()">...
0
votes
1answer
28 views

Angular Directive - ngRepeat Adding Removing from Array

I need to iterate over an object property which is an array of objects, in order to render input fields. I need to be able to dynamically add/remove objects from the array and display the ...
0
votes
1answer
17 views

Angular TypeScript Directive's Link method doesn't get called

I am trying to implement a Role-Based-Access-Control system where the allowed resources will be loaded from server after login. I could manage to check it using raw JavaScript code. angular.module('...
0
votes
0answers
24 views

Angular 1.6+ - How to set ng-options dynamically from the DB using the element inside a forEach loop

I want to take a response from a web service and apply it to the ng-options inside the angular.forEach loop. All I think I have to access it is the element itself. Here is the code. Normally I would ...
0
votes
3answers
34 views

Angularjs multiplication operation in html

I am using http get request to get data and show it in my directive, gauge directive has value attribute that takes number, i am binding like this value="" attribute from ng-repeat in html. The ...
0
votes
1answer
15 views

How to declare directive or service i can use like a function in AngularJS expression

I have many functions to convert Datetime format. I'd like to create a directive or a service to call these functions everywhere in my project. Here is one of my functions. $scope.formatDateTime = ...
0
votes
1answer
19 views

Why does not change value in directive Angular js?

I have simple directive in Angular JS: .directive("statusClass", function() { return { restrict: 'A', scope: { 'status': '=' }, ...
0
votes
0answers
8 views

Angularjs image uploading to s3 with ngs3 upload library validate file format issue

s3 upload to upload images to Amazon s3 bucket from my Angular application. Github url - https://github.com/asafdav/ng-s3upload. But i can't validate file format such as .jpg, .png using the directive....
0
votes
1answer
34 views

Child directive not updated when parent directive property changes

This is follow up to these 2 questions: Pass argument between parent and child directives Parent directive controller undefined when passing to child directive I have this part working; however, ...
0
votes
1answer
23 views

How do I use an attribute directive inside an element directive template in angularjs?

I have a need to show a list of check boxes on my site listing products and other items. The checklist-model attribute directive works well for this because I can bind it to a list of items that ...
0
votes
1answer
25 views

Angular js, how to append html inside div? (using controller)

i'm trying to append inside the div "otherfield", a directive element, using while loop in the controller, who is binded to html using updateBoxes function: HTML <input type="number" min="2" ...