Tagged Questions
4
votes
2answers
4k 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?
63
votes
4answers
42k views
Adding parameter to ng-click function inside ng-repeat, seems not to work
I have simple loop with ng-repeat
<li ng-repeat='task in tasks'>
<p> {{task.name}}
<button ng-click="removeTask({{task.id}})">remove</button>
Also, there is a function ...
4
votes
3answers
526 views
ng-click doesn't fire when added post load
I'm trying to do a variable replacement while also making it clickable with ngClick.
I made a plunker demo (click the button and observe that the input box stays unchanged)
Markup:
<body ...
12
votes
3answers
7k views
How to use ng-click with multiple expressions? [duplicate]
I want to use ng-click to perform multiple expressions. I want to both set a value on a model, and call a method from the $scope, like this:
<a ng-click="navigation.book = book && ...
9
votes
1answer
1k 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 ...
6
votes
2answers
4k 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 ...
3
votes
2answers
5k views
Toggle css on ng-click
This is the basic idea of my code:
HTML (jade):
#preferencesBox(ng-click="toggleCustom()")
.glyphicon.glyphicon-heart
CSS:
#preferencesBox.active{
color: #d04f37;
}
Angular:
$scope.check ...
3
votes
1answer
340 views
angularjs ng-click silently eats errors
If I have an ng-click like this:
ng-click="buggy()"
and click on no error message is generated on the console.
This makes it a bit tricky to debug.
Why aren't error messages generated? Anything ...
2
votes
4answers
2k views
how to use a model property as variable ng-click
I'd like to have function calls for ng-click stored as strings in my model.
I can't use ng-click="m.func", and if i'm using ng-click="{{m.func}}" ist also not working.
http://jsfiddle.net/j8wW5/19/
...
1
vote
2answers
310 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, ...
0
votes
1answer
3k views
insert ng-click event into ng-grid
i want to do something that i don't know if it is possible
HTML
<!DOCTYPE html>
<html ng-app="myApp">
<head lang="en">
<meta charset="utf-8">
...
3
votes
1answer
3k views
AngularJS - ngSwitch and ngClick not working in ngRepeat
I want to display the elements of a list thanks to a ngSwitch but I can't figure out how to do with a ngRepeat. I've begun by doing it without a list, just to understand how ngSwitch works and to show ...
2
votes
2answers
98 views
How can I change ng-click behavior for a single element in an ng-repeat?
I am refactoring a table written in angular. Currently ng-repeat is used to create multiple tables rows, any of which will redirect to a given ui-sref when clicked upon:
<tbody>
...
2
votes
2answers
232 views
Angular: Add ngClick from js
I am developing small web page for mobile devices with Angular.
I want to toggle click listener for whole page like
$('.page').on('click',...);
$('.page').off('click',...);
but in Angular way. And ...
0
votes
1answer
1k views
Popover content not working with angularjs ng-click
I have already read all the posts about this, but unfortunately none of them was helpful: jsfiddle and plunker links appear to be no longer working.
What I am trying to do is to simple put a button ...
0
votes
2answers
1k views
jQuery not working with ng-repeat results
I am using ng-repeat to build an accordion using jQuery and TB. For some reason, this is working perfectly when hardcoded but fails to trigger on click when inside of the ng-repeat directive.
I was ...
0
votes
1answer
414 views
ng-click not working in IE but works fine in CHROME
<select id="from" multiple="multiple" name="list" ng-model="selectedVal">
<optgroup label= "{{geo.Geo}}" ng-repeat="geo in Geographies">
<option id="{{country.CountryKey}}" ...
0
votes
1answer
2k views
Angularjs - ng-click and $event.stopPropagation disable twitter bootstrap context menu
Hey guys so I am trying to use $event.stopPropagation because I have many different clicks in one container that need to be independent and I handle them using $event.stopPropagation as well, but when ...