0
votes
0answers
23 views

angularjs ajax call wrapped by $scope.$apply function preventing ng-click from being executed

I have and custom validation directive which triggers on change to validate user input: link: function(scope, elem, attrs) { elem.on('change', function() {$scope.$apply(function(){ ...
0
votes
1answer
17 views

Show form using custom directive - AngularJS

I have a button with ng-click function. When I click the button, it should show the form which is coded in a templateUrl using a custom directive. Which function should I use to get the screen ...
0
votes
1answer
53 views

AngularJS - Using a custom filter and ngClick to update same ng-repeat

I have a simple ng-repeat. The ng-reapeat can be populated in 2 ways, firstly by typing a value and clicking the Submit button, secondly, entering values and the list automatically updates. The issue ...
1
vote
0answers
34 views

AngularJS - JSON and return all results

I'm trying to write a basic search function using AngularJS. I have written a service that finds my JSON file and binds it to a $scope object $scope.SearchResult What i am trying to do it perform a ...
0
votes
1answer
56 views

Ng Table Pager template is not allowing any custom data binding like ng-click=“Custom Function”

first I have used a ng table pager template I am not able to use my custom function like ng-click='first()' instead of ng-click="params.page(page.number)" and then call the parameter inside it's ...
1
vote
2answers
88 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 ...
1
vote
2answers
42 views

ng-click loose the function context

I am using angularjs. I have a directive that gets a function as parameter: module.directive('someDirective', [function () { return { restrict: 'E', template: <button ...
0
votes
0answers
43 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
2answers
38 views

AngularJS - accessing ng-click in custom directive

I'm trying to get my head around directives, i can easily use the template function to throw out my HTML, however, if i have an ng-click within my template, how can i access it within the link ...
0
votes
2answers
44 views

Why are mouse events from my directive not reflected in the view?

Here is an example fiddle. Please open the console first. It's a little long, so to quickly explain: You'll see two divs. One is "regular", the other is created via a directive. They both have ...
0
votes
1answer
80 views

AngularJS - Binding 'click' to directive

I'm currently working on a simple module to display notifications to the user in the form of toasts, or popups, that appear in the lower right-hand corner of the screen. The following directive works ...
2
votes
2answers
128 views

Why does ng-click=“test()” not work but onclick=“angular.element(this).scope().test()” does?

I have defined an angularjs directive as follows: jtApp.directive("jtWizardPage", [function () { return { require: ["^ngController", "^jtWizard"], restrict: "E", replace: ...
0
votes
1answer
93 views

AngularJS - Issue appending HTML to single item in ng-repeat

THE SITUATION: I am exploring AngularJS by re-building a former project with it. I am using the angularjs-rails gem version 1.2.16. I have a page were I make an API call that returns an array of ...
1
vote
2answers
168 views

How to invoke ng-click from a directive partial?

I have a directive that has a local scope where a partial contains ng-click. The Fiddle is there: http://jsfiddle.net/stephanedeluca/QRZFs/13/ Unfortunatelly, since I moved my code to the directive, ...
1
vote
0answers
83 views

Disable ng-click on certain conditions of application for all types of element

In my application I've binded several elements with ng-click directive like below <a ng-click="DoSomething()"/> <button ng-click="DoSomethingElse()">xyz</button> <span ...
0
votes
0answers
100 views

Fire directive, refresh, & pass parameter on ng-click

tldr; I need to fire a custom directive/jQuery plugin on ng-click and pass a parameter to it then reload that page so the parameter's value takes place. So on reload instead of there being 3 results ...
0
votes
0answers
184 views

Why does using Angularjs ng-click, to call directives method($event) leads to Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting

I tried to write an custom map directive for an Phonegap + Angular OpenSource project you can find here: https://github.com/MariusSchmidt/Schreibwerkstatt/tree/Bettermap. My problem is, that when I ...
0
votes
0answers
591 views

AngularJS, data-ng-click not triggering function, and routing only showing up on firefox, not IE or chrome

I am doing tutorials on AngularJS, and I'm having two problems. First, I have code that is showing a page on Firefox, but not on IE or Chrome, and data-ng-click is not triggering any function: here is ...
0
votes
0answers
194 views

Two ng-repeat, $index not sending the right value in the second ng-click

I have two ng-repeat that follow each other in the same directive: <section slider class="slider"> <nav> <ul> <li ng-repeat="slide in slider[0]" ...
6
votes
4answers
5k views

Automatically pass $event with ng-click?

I know that I can get access to the click event from ng-click if I pass in the $event object like so: <button ng-click="myFunction($event)">Give me the $event</button> function ...
1
vote
1answer
34 views

Attempting to pass an expression as an argument to a directive. Being taken literally instead of value

I'm trying to pass the value from an that is displayed through an ng-repeat into a function in my controller. The value displays properly in the HTML but when I get over to the function it displays ...
1
vote
2answers
556 views

Triggering a function with ngClick within ngTransclude

I have an unordered list loaded with four items from an array while using ngRepeat. The anchor tag in the list item has a function in the ngClick attribute that fires up a message. The function call ...
4
votes
2answers
2k views

Handling ng-click and ng-dblclick on the same element with AngularJS

I was looking for both single and double-click event handling with AngularJS, since AngularJS always fires only the ng-click event even if there is ng-dblclick directive set for our element. Here is ...
0
votes
0answers
159 views

ng-click="show… not working in directive

For the life of me I can't get ng-click="show''" to work in the directive correctly. HTML <sortable ng-controller="SortableCtrl"></sortable> <div ...
0
votes
3answers
461 views

What element raised ng-click in custom directive ng-repeater

I have a repeater inside of a directive that spits out table rows. When a user clicks on a row I want to highlight that row. I have something that works, I was just wondering if there was a better ...
4
votes
1answer
188 views

ngClick does not fire in recursive template

I developed a classic recursive menu and it build itself fine. Problem is that ngClick is never fired from the elements of the recursive directive. I know it's a problem of scope and I tried many ...
0
votes
2answers
458 views

ngClick on anchor tags causing problems in Angular

I've got ngClick directives on the anchors tags inside my main navigation, to make the menu "disappear" off canvas after clicking it: <a href="/#/profile" ng-click="showNav = false"> It's ...
0
votes
0answers
317 views

Unbind ng-click for dynamic dom element in angular

I have a dynamic div which is conditionally pushed into the dom. I have an ng-click event bound to a child element inside the div which fires myfunc() . Now when that div is removed and re-added to ...
1
vote
1answer
2k views

Injecting a HTML template to DOM on click the clean way (Create an instance of a class)?

In my AngularJS project I have something like this (it's a dropdown menu with customer names. With a click on one of the names a Scrum Card should appear with the customer's names inserted in the ...
4
votes
2answers
3k views

AngularJS - how to override directive ngClick

I want to override directive ng-click: to some make some $rootscope changes before each execution of ng-click. How to do it?
8
votes
1answer
940 views

Decorating the ng-click directive in AngularJs

I've been looking into modifying the AngularJS ng-click directive to add some additional features. I have a few different ideas of what to use it for, but a simple one is to add Google Analytics ...
1
vote
2answers
10k views

Angular Directive ng-click Not Working

Plunker I have an external controller that contains a directive inside of its view. The directive gets a list of process points and generates links where you can select each one. It correctly sets ...
0
votes
2answers
1k views

Bind ng-click function in compile with AngularJS

When we try to add an ng-click function (linked to a controller action) onto an element during the compile phase, it is not working. We can get it working if it is in the link function, but as we ...