0
votes
0answers
23 views

$watch does not fire when changing $scope property

I have doubts I've done something wrong or I just do not understand. Whats wrong in my directive? app.directive('sideMenu', function() { return { restrict: 'E', templateUrl : '/...
0
votes
1answer
21 views

ng-option and ng-repeat, linking up selected object

<select size="20" style="width: 585px" ng-disabled="disableControls" ng-model="ComputePermissionsService.selectedPermission"> <option ng-repeat="permission in ComputePermissionsService....
0
votes
2answers
29 views

Filter with ng model not working angular js

I have tried to implement a filter on angular tree with all corresponding nodes opening while filtering. Could you help me please ? Here is the fiddle : http://jsfiddle.net/6c1mg3od/1/ What I have ...
1
vote
1answer
17 views

Inclusion of Angular directive files into index.html prevents running of one directive

I included two simple directives to my index Html file. But weirdly the file I included above is not working. If I add the files to index.html individually, each file is working well. My index Html ...
-2
votes
2answers
21 views

Changing the CSS of a div in AngularJS directive

I have a problem I have created a directive which is doing ng-repeat on an array of objects ---Showing the value on gui------ Now I want that if I click on any div of this repeat that particular div'...
1
vote
3answers
27 views

Angular directives that call methods on child directives

I am looking for advice on how to implement a hierarchical structure in Angular, where a directive (<partition>) can call a method on a child directive's controller (<property-value>). I ...
-3
votes
0answers
14 views

Angular Memory Leak: Is this usual behavior? [on hold]

enter image description here Is this usual behavior?
-1
votes
1answer
15 views

How to update the directive when the parent's scope variable changes?

Directive: <div ng-show="{{ show }}"> ... </div> angular.module('mymodule').directive('mydirective', [ function () { return { scope: { show: '=' }...
2
votes
1answer
19 views

How to make expression evaluate more than once in a directive?

Currently, in my $scope for my controller, I have an attribute $scope.disabled = true. In my HTML file, when I use ng-disabled = {{disabled}}, that element is initially disabled, however when I ...
0
votes
1answer
41 views

Angular template directive binding

I wrote single file with directive templates. This file is appended to document using ng-include directive. Sometimes browser load templates before directive template binding, but not always. https://...
0
votes
1answer
14 views

Run angular function when scroll to up in chat app (pagination)

I have a chat app and I want design a pagination on scroll up event (NOT DOWN). I need a directive for this job.Also I want to show preloader in new page data load. How to implement it?
0
votes
1answer
22 views

ng-pattern regex throwing error

I am using ng-pattern to validate number(Comma seperated input field allowing only number). But it is throwing the following error in the console eventhough it is working fine. Can anyone tell me what ...
0
votes
1answer
27 views

Angular 1.5 custom validation directive for ng-messages

I'm working on custom directive for ng-messages where with adding one directive "custom-validation" to input field: <input name="inputName" ng-model="vm.inputName" custom-validation="vm....
0
votes
0answers
32 views

Angular v1 Component to Component data transfer

I'm struggling with a problem within Angular v1.6.1 where I am trying to transfer some data from a component to another component. I have a component called navbar which resides in app\common\navbar ...
0
votes
1answer
34 views

How to handle jQuery(window).scroll functions efficiently in jQuery?

This is my current code and feels like it's not very efficient and would perhaps be better if Timer/Timeout is used. However, I'm lost as to how to go about it. Could someone help? Not very efficient ...
0
votes
0answers
10 views

Setting Default Image angular-ng-upload directive Angularjs

I am using danialfarid angular-ng-upload directive. Through my PHP Backend i get user information and i am trying to edit the information for that user. One of the fields are user_image which returns ...
1
vote
1answer
45 views

angular 1.6.1 '&' binding issues

Problem: When I bind '&' under ng-repeat(or without for that matter atm), I can't seem to trigger the parent scope's function. HTML <div ng-repeat="type in fC.types"> <repeater type="...
1
vote
1answer
33 views

How do I prevent html element from being pushed down when dragging an element over?

I'm writing an angular directive using HTML Drag & Drop API. The directive works fine however it adds up an empty space between the elements when dragging an element over the other. For instance:...
0
votes
1answer
14 views

AngularJS Directive names

I'm currently following this tutorial: https://medium.com/@tweededbadger/tutorial-dynamic-data-driven-svg-map-with-angularjs-b112fdec421d#.tk8zc63b6 He created a directive for 'svgMap' angular....
0
votes
0answers
15 views

How to use amazingSlider plugin in AngularJS

I'm new to AngularJS and gone through lot of post to use jQuery plugin in AngularJS. But still I dont know how to use this amazingSlider. Please help me into it. I've created directive for slider, and ...
1
vote
1answer
22 views

Adding Form Fields Dynamically in angularjs not working

I am developing an online course application. I am trying to add form fields dynamically in my application, so that I can add more video lecture for a course. However, when I click on "Add Another URL"...
2
votes
1answer
35 views

can't pass dynamic parameter to angular directive

I just took over the frontend work of our angularjs apps and I'm stuck. I've been creating directives to replace bloated html to make updating the frontend look easier. All was going well till I hit ...
0
votes
0answers
42 views

Angular $http.POST sending empty body sometimes

I am using $http to post some data, and receiving it on GAE backend with python. Most of the time everything is working fine, but some times the post body is empty. This keeps happening for specific ...
2
votes
1answer
22 views

Why does $compileProvider have a directive method?

I observe from the Angular documentation, that $compileProvider has both a directive() and component() method. See: https://docs.angularjs.org/api/ng/provider/$compileProvider I also observe the ...
0
votes
1answer
21 views

Passing Controller's $scope variable to nested directive's controller

I'm having trouble passing a scope object from one controller to a nested directive's controller. I have a directive (child) within another directive (parent), the parent directive and its controller ...
0
votes
0answers
14 views

How to create angularjs directive with browserify?

I'm getting tripped up on the syntax, and my overall understanding. I've tried to create a directive as an element, and I get a repeating loop where it tries to load angular more than once. Does ...
0
votes
1answer
28 views

ngModel.$setValidity only works once

I'm currently working on a angular bootstrap ui datepicker popup validation, the thing is that I can set the max a min date and validate that (only when the user set the date by clicking on the ...
0
votes
0answers
9 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
2answers
34 views

how to create custom directive to show ngFileUpload validation messages?

I wrote simple directive to show ngFileUpload validation messages as you seen below: angular.module('app').directive('imageMessages', imageMessages); function imageMessages() { var directive = { ...
0
votes
0answers
27 views

How to reload directive from controller or is there need here directive

I have three links and three controllers for each three link. But, same HTML page need to show. Just need to process (in controller) and reload that page on each click of that link. If I create ...
0
votes
2answers
28 views

How to preserve scope in componentized Angular app containing a dialog that serves a custom directive

I have a question about how to pass scope to a template rendered from a directive. This seems like it should be so straight forward but somehow I am having a lot of trouble getting it to work. My ...
0
votes
0answers
31 views

image preview directives using angularjs

I would like to have image preview upload with trigger another element, so that I have put together in directives. http://stackoverflow.com/a/25674293 AngularJS Image Preview before Upload showing ...
0
votes
0answers
12 views

what are some best practices for inter-component communication?

I am working on angularjs 1.5, Please refer following image to understand the question. I have main component which contains Component A and Component C. Component A contains many Component B. I have ...
1
vote
1answer
29 views

Angular Nested Filters & Infinite $digest Loop

I (like so many others) have run into an issue with the infinite $digest loop. After reading many SO Q&As and spending plenty of time in AngularJS documentation I am still not certain how to build ...
0
votes
1answer
15 views

karma angular templateUrl not found

I've some problems when testing angular directives with karma, the problem is that when comes from templateUrl never translate it. here is my karma.conf.js 'use strict'; var wiredep = require('...
0
votes
0answers
16 views

Override core angular directive

I know I can override a directive in the following way: angular.module('3th-party-module') .directive('3th-party-directive', my3rdPartyDirective) However I would like to override the behavior ...
0
votes
0answers
7 views

Angucomplete-alt: set minlength programmatically in JS

I have a filter directive that uses angucomplete to filter items on a given page. Depending on the page I am on, I would like the minlength for angucomplete to do the initial filter to change. Is it ...
0
votes
2answers
35 views

AngularJS apply class on change in ng-repeat with pagination

I'm trying to apply a class to an item in a paginated list ,for that I just simulate a click on the element in the directive link property : link : function (scope, element, attrs) { ...
0
votes
1answer
13 views

Angularjs - dynamic elements/templates

I'm trying to figure out the best way to create dynamic elements. Basically, i have a multi-select list, eg... Item 1 Item 2 Item 3 Once selected either one or more, it needs to generate elements ...
0
votes
0answers
17 views

AngularJS using string to select directive

I would like to select a directive via a string. The controller would look like this: app.controller('demo_ctrl',function($scope){ $scope.directiveName = 'theName'; }); And in the HTML it should ...
0
votes
2answers
33 views

communicating between directives controller

I know if I have two directives that are nesting I can communicate throw controller, require and pass it as the fourth parameter of the link function. <my-first-div> <my-seconded-div>&...
0
votes
0answers
34 views

ng-data-show not working properly with ui-select

If I use data-ng-show inside ui-select the input box takes width of 10px which is the inline style for that input box but if I remove the data-ng-show it works fine. Why is it so? Is there any other ...
0
votes
1answer
14 views

Using template from 1 directive into another directives template

Basically I have 2 custom directives, each having it's own template. What I need is to insert one of the templates into the other. I have also read about transclusion, but can't wrap my head around it....
0
votes
1answer
35 views

Problems with isolated scope and bindings

I try to build directive in which i want to change model on clicking by element. Some sort of checkbox... Here is my code mainApp.directive('subCategory', function(){ return{ restrict: 'A'...
0
votes
0answers
72 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 ...
-2
votes
0answers
33 views

Replacing a line in jQuery with AngularJS code for a click function

angular.module('homeApp', []).controller('myCtrl', ['$scope', function($scope,$http) { $scope.multiSearch = function() { $('#bs').attr('action','--actionvalue--'); $scope.indexForm.submitted=...
0
votes
0answers
25 views

How to send application level all click events to backend service - Angular Js

I am trying to capture all the events in the application like button clicks and want to send all the events to backend service with other parameters like name,location. I created one factory method ...
0
votes
0answers
29 views

Pass an argument to a property function of a custom directive

I have a piece of code (plnkr), which stringifies a list of handsontables. Changing any cell value in a table will systematically change its corresponding string. One thing I realise is that, after ...
1
vote
2answers
28 views

How to replace text on field after click Angular?

I have HTML code with inline element: <span class="title" ng-click="update()">Rock</span> How to replace this element on input element after click for edit? And then after push enter on ...
0
votes
3answers
30 views

Angular directive not picking up the values set by parent

I have a directive that has a div, whose visibility is set by its parent. Expecting "show" to be true, but the div is still not visible initially on page load. Directive: <div ng-show="{{ show }}"...