0
votes
1answer
16 views

Directive talks to controller but cannot call functions residing in controller

I have a directive which needs to call functions from the Main controller but everytime i try to reference a function inside the directive nothing happens because it's undefined. When I access a value ...
0
votes
2answers
27 views

AngularJS Populating input field with directive but not captured in $scope

When I populate an input field from within a directive, it shows on the DOM, but $scope is not capturing the value. How do I fix it so that $scope captures the new info? How to reproduce the ...
0
votes
1answer
11 views

How to append a directive to another directive which calls a function from controller.

I'm trying to append a directive which occurs when an event is fired via the $watch function in angular. The first directive updater would insert a custom element <confirmation /> into my view. ...
0
votes
1answer
29 views

Initiating directive from controller

I'm having trouble figuring out a way to initiate a directive once the data has been returned. I'm trying to build a report using html tables and ng-repeat. The report object is generated using a ...
0
votes
0answers
15 views

How do I capture table td elements using mousedown.dragselect event?

I have a directive which renders a HTML table where each td element has an id What I want to accomplish is to use the mousedown.dragselect/mouseup.dragselect to determine which elements have been ...
0
votes
2answers
40 views

generic functionality wrapped as a directive

I am attempting to write a directive that will sort arbitrary data at an arbitrary place in my application. Let us say I have the following code (based on actual real code, sort function and some of ...
1
vote
1answer
22 views

Directive - getting values from views -scope “@”

I am trying to make a button, which changes its styles every time it's clicked. The console keeps making errors - 'initial' is not defined. I've been trying to figure out why but so far no luck. ...
1
vote
2answers
20 views

Can you do conditional formatting with AngularJS?

I have an element containing a value from my controller: <span>[[myvalue]]</span> which I'd change the background color depending on the value. For example values 1-5 should have red ...
1
vote
0answers
17 views

JQuery custom dropdown plugin with AngularJS

I have seen this amazing drop down [on codrops][1]. But I need to use this in an AngularJS application. How can I use this JQuery plugin in my AngularJS application. I am very new to AngularJS. Is ...
0
votes
2answers
14 views

Angular Directive on Binded Values

Im trying to make a text formatting Directive in Angular. In my current application i have many places where i have to present time in HH:MM:SS format, the time in the DB is saved in seconds. So i ...
0
votes
1answer
36 views

Angular directive to replace external links

How can i create a custom filter to replace: <a href="http://www.externalsite.com">Whatever text</a> into this: <a href="#" ...
1
vote
1answer
38 views

How to pass object/multiple arguments from Angularjs factory to spring controller

I am a newbie in Angularjs so please bear with me, I have a requirement where I have to pass an Object to factory from controller.js in AngularJS , which calls a rest service and that object param is ...
1
vote
1answer
32 views

angular ui router directive dynamically ui-sref

HTML <li class="dropdown signals" signals="signals" data-nb-signals="" style="visibility: hidden;"> <a data-toggle="dropdown" href="#"> <i class="glyphicon ...
0
votes
0answers
7 views

How to get Screenshot of grid in angularjs or html5 using a directive(event broadcast)?

I have a 'Take screenshot' button directive in my angularjs app. Actually, a page in my app, contains many other components including a Datagrid directive and a toolbar with many buttons. One of ...
0
votes
1answer
25 views

AngularJs - “deferred” or “batched” directive

I know the first thing you might say is "what have you tried", but the only answer I can give is "google" or "books". So unfortunately there is no code here. What I am trying to achieve is as ...
0
votes
0answers
37 views

How to pass object or multiple parameters to AngularJS factory and thus to Spring Controller?

I am a newbie in Angularjs so please bear with me, I have a requirement where I have to pass an Object to factory from controller.js in AngularJS , which calls a rest service and that object param is ...
0
votes
0answers
28 views

Angular programmatically add ngChange without attribute

I'm trying to simulate the ng-change attribute in a directive without modifying the HTML (so without the ng-change property). Looking at angular source code of the ngChange directive, my directive ...
0
votes
1answer
22 views

How to pass all attributes passed to my custom directive to the control used inside directive template?

Can someone help me with this problem? Let's say I have a custom directive called mycontrol. I want to pass all the attributes in this directive to a control used inside my directive template. Here ...
0
votes
0answers
11 views

AngularJS qTip with conditional show/hide events.

The requirement is I want to display qTip on all the elements of a FORM i.e. text, radio, combo etc. Textbox should show/hide qTip on click/blur where as radio, combo, checkboxes should show/hide qTip ...
0
votes
0answers
13 views

Append element using angular after a specific action

I have a directive which $watches for changes I want to fire a success message after that so suppose my element is tr . Appending the following code wit the after function does what's needed but it ...
0
votes
1answer
21 views

How do you update directive html and compile so that angular responds?

Here is a fiddle with my broken code. I've created a simple little directive (by no means complete) that presents a date picker in the most simple way possible. When bound to a scope property, the ...
0
votes
0answers
12 views

Custom Directive with custom filter not passing parent scope in IE or Firefox (works in Chrome)

I have a custom directive that creates a list of events, filtered by a custom filter 'DateRange' that checks events within a date range. The start date and end date used in the filtered are scoped to ...
0
votes
0answers
15 views

angularjs syntax highlighter with regex directive

take a look at this plunk: http://plnkr.co/edit/TzbZ0yj7DLL9c7RveSRp?p=preview the pre2 works with the .service 'formatter' and the .directive 'snippet' the pre1 and the textarea 1 are working with ...
0
votes
0answers
14 views

Angularjs - Google Maps Set Zoom for Multiple markers

I am using this set of Google Maps directives in my app. My question... why do certain pairs of markers have a correct zoom level (meaning I can see both of them and they are not zoomed in too close) ...
2
votes
1answer
21 views

How do I call a method on an Angularjs directive from outside it's template?

I'm new to Angularjs so please bear with me. I wanted to create a generic wizard that would allow me to walk through a process. I started by creating a custom directive that handles pretty much all ...
3
votes
0answers
52 views

Angular replace directive for SVG (result is in DOM but not displayed)

I have a set of Angular directives for drawing svg charts, which I need to use. The exact directive name depends on the type of the chart (i.e. 'barlineChart', 'bulletChart' etc.). To simplify things ...
1
vote
0answers
27 views

Drag and drop used inside a modal (popup) on angularJS

I want to show a list inside a modal (popup) and be able to drag and drop the elements into several lists. I use this drag and drop directive for angularjs : ...
1
vote
0answers
19 views

Communication between directives on the same element

I've got an element that is draggable. When its dragged I want a directive assigned to the same element to do some DOM manipulation. So in other words, the second directive is dependent on draggable ...
0
votes
3answers
26 views

AngularJS - ng-click in directive's link function

I'm working on a directive, and in the link function, while iterating over a array model, want to append elements to the page with ng-click handlers attached to them. Something like this: ...
1
vote
0answers
28 views

element directive cannot display on page when call from other directive

I am getting a problem while calling colors element directive in draggable directive. when i call colors directive it add "" string in html. I want a select element populated with colors array ...
2
votes
0answers
18 views

How to move an element automatically when I drag/resize another element?

How to move an element automatically when I drag/resize another element ? I would like to move div.duree and when it is close to another div.duree. At the moment, I can drag the elements ...
0
votes
0answers
28 views

Keyup/Keydown/Keypress events not firing in Internet Explorer 11

I'm using a mixture of JS key events and AngularJS to prevent the user from entering non-numeric keys in an input field (via a directive). While the following works in Firefox and Chrome, Internet ...
0
votes
0answers
10 views

svg genrated with angular ng-repeat is not rendeerd

I'm trying to generate some svg element trough angular ng-repeat I created one directives that should just import the template this is the code with the ng repeat <svg width="600" height="600" ...
0
votes
0answers
12 views

angularjs: Unit testing with simulate click

I'm unit testing a directive, and I have something like this <bar-foo> <a ng-click=show = !show">click me</a> </bar-foo> var scope = el.isolateScope(); ...
0
votes
1answer
16 views

multiline template in directive definition

I am trying to make a directive template multiline. Is this possible? myApp.directive('myDir', function() { return { restrict: 'E', template: '<div> |Hello, ...
0
votes
1answer
45 views

How to execute a sequence of events in Angular using $timeout

I have a div in my view, I want to execute a function on ng-click() which turns the background for the div to 'color a' for 30 seconds if there's no action taken then for 60 seconds then change to ...
2
votes
1answer
28 views

Angular: Call directive controller function from separate controller

Let's say I have an app called myApp. There is a directive for a menu component. This directive has a controller defined on it. Now, from another controller that loads the view, I want to call methods ...
0
votes
2answers
22 views

pass arguments to a function call in a directive via angularjs

I have a custom directive. In my html i write this: <uploader action="/rest/file/create_from_form.json" success="writeFid()"></uploader> What I need is to exec "success" attribute ...
1
vote
1answer
20 views

How do I properly build an AngularJS labeled radio input directive?

I realize that AngularJS already has an input[radio] directive and I want to leverage that as much as possible. I created a JSFiddle here, but I can't figure out how to get the ng-model property to ...
0
votes
1answer
24 views

Compile Service with Angular

I want to create html based on variables, I created a directive and called "node", and I wanted to use it as a template to generate markup based what attributes are passed into the directive. However ...
1
vote
0answers
31 views

How to separate functionality of Angular directive

I have this extend text component which can add auto complete, tagging, and search query capabilities to a input/textarea (which can work independently or together). Instead of having all the ...
0
votes
0answers
16 views

how to code to get the file to open in pdf format in angularjs

Hi I am really new to angular and trying new stuff. I have a button which says download pdf and on clicking this the file should open in the new window in pdf format. How can this be achieved the ...
0
votes
2answers
17 views

Angular directive to add content rather than overwrite

I am trying to write a directive that will show a "loading" message over a div while the data is fetched from the server. Thus far I've managed to get this: .directive('dataLoadingPanel', function ...
0
votes
1answer
25 views

AngularJS value not passing to directive

I am using ngTagsInput which has an auto-complete feature. It seems to be working very well. My problem is I want to know how to pass the query from source="loadTags(query)" into the directive, but ...
0
votes
0answers
26 views

Simple “pager” directive

I've created some simple pager: index.html: <div class="container" ng-controller="NewsCtrl"> <ul ng-repeat="news in newsList"> <li ng-show="$index < count">{{ news ...
0
votes
0answers
21 views

How to add an AngularJS directive to the element object during a directive's link function?

I built two custom directives, datepicker and date-validation, and I'm having trouble with getting datepicker to include the date-validation directive. At first I had the datepicker and date ...
1
vote
3answers
46 views

AngularJS Directive for specific tag name

How can I force specific tag for a directive in AngularJS? For example, I want to create a directive that will be applied only on <img> tags. If the user put this directive on a <div>, I ...
0
votes
3answers
34 views

How to prevent anchor default in dynamic ?

Demo According to ng/directive/a,to prevent the anchor route is <a></a> or <a href=""></a>,and yes, it works but not for dynamic content.In the demo above show the generated ...
-5
votes
1answer
33 views

how to add selected value of drop down list item value stored in html table in angularjs [on hold]

Please give me sample program with work out in plunker. My code is function List($scope){ $scope.list_array=[ {number:1,name:'A'}, ...
1
vote
1answer
27 views

AngularJS - get original element from ng-click

I have a list of items in my view with ng-click attached to them: <ul id="team-filters"> <li ng-click="foo($event, team)" ng-repeat="team in teams"> <img ...