The ngClick allows you to specify custom behavior when element is clicked.
-1
votes
2answers
35 views
AngularJS Passing ng-repeat value to ng-click
Angular 1.5
I am trying to pass noteNumber into a function call in ng-click.
How is that bound? This is in error.
<span ng-repeat="noteNumber in row.Notes">
<a href="#" ...
6
votes
3answers
7k 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
2answers
37 views
Typeerror - Not a function in angular directive
I have defined a custom click directive as below:
(function() {
'use strict';
angular.module('myApp.core')
.directive('customClick', customClick);
...
0
votes
2answers
2k views
AngularJS - $compile is not defined in ng-click
I'm trying to run this command in ng-click:
formFieldTemplate='<element fieldvalue="' + $( "#"+name+"Div").attr('fieldvalue') + '" name="' + $( "#"+name+"Div").attr('name') +'[' + dynamic_count + ...
1
vote
1answer
41 views
Angularjs expandable table row
I am using angular 1.4.3 and angular dataTables (here's the link: http://l-lin.github.io/angular-datatables).
My needs is basic. I need to expand the row when it is clicked and all the ng-click's or ...
0
votes
1answer
49 views
AngularJS ng-click function
please help me, I would like to access a function using ng-click like this :
<tr ng-repeat="data in listtalentapegawai">
<td>
...
7
votes
3answers
5k views
Using AngularJS and jsPlumb (use jsPlumb functions in AngularJS controller)
So I have a project that I am working on and it requires that I use jsPlumb for graphical elements connections and I am building my app entirely using AngularJS.
What is the procedure to follow if I ...
35
votes
6answers
69k views
How to trigger ng-click [AngularJS] programmatically
I want to trigger ng-click of an element at runtime like:
_ele.click();
OR
_ele.trigger('click', function());
How can this be done?
1
vote
2answers
28 views
NgClick on <li> NgClick inside of it
I have following code:
<ul class="dropdown-menu">
<li ng-click="setValue('X')" ng-class="selected === 'X' ? 'active' : 'not-active'"><span>X <i class="fa fa-times" ...
1
vote
4answers
35 views
Angularjs ng-click() is not firing from ng-repeat directive
I am trying to trigger test() using ng-click but it's not working. The test() function works with ng-click elsewhere though, so I am assuming that it has to do with the fact that it is an ng-repeated ...
0
votes
1answer
41 views
Creating single custom directive for ng-click to perform multiple controller function
I have the following code:
<div>...
<div class="glyphicon glyphicon-filter ng-click="vm.add()" tabindex="1">
<a href='' tabindex="2"><img id="touch" ...
0
votes
1answer
27 views
Bootstrap switch with ngClick
Good day, I would like to ask if it is possible to add a ng-click event on bs swtch? Im making an app that is when a bootsrap switch is turned on, a modal dialog will pop up. Can someone please give ...
1
vote
1answer
80 views
Angular ng-click event not firing from controller binding in Directive template
I have created a simple directive to load a template. Within the template is a binding to a function in the controller that I wanted fired on ng-click.
The directive:
angular
.module('myApp')
...
21
votes
4answers
8k views
differences between ng-submit and ng-click
In angularjs I'm wondering what the differences are between ng-submit and ng-click? Specifically, pros and cons of each and when should you one or the other? Thanks!
**EDIT**
I've looked in to this ...
0
votes
1answer
27 views
selecting a day from UICalendar
I am fairly new to angular I am trying to implement a calendar using ui-calendar. So far I have been able to display a very basic calendar and some events on it.
Now I need to be able to click on a ...
38
votes
6answers
115k views
adding and removing classes in angularJs using ng-click
I am trying to work how to add a class with ngClick. I have uploaded up my code onto plunker Click here. Looking at the angular documentation i can't figure out the exact way it should be done. Below ...
0
votes
1answer
32 views
ng-click not working on inner div
I have a very simple thing I am trying to do. The ng-click is not working. Any ideas why? Is there a problem with divs that are embedded in another div or am I just too sleepy? That item affected is ...
7
votes
4answers
26k views
AngularJS: ng-click on img? Manipulating images (kind of gallery-like) with jQuery?
Should ng-click work with img tag ?
<img ng-src="img" ng-click="openNewWindow(url)/>
myFunction is defined in controller and is $scope available …
Nothing gets called; any ideas?
(I would ...
0
votes
0answers
28 views
Is it possible to use photoswipe with ng-click?
I am trying to use a photoswipe gallery in angular, but it does not work if I try to add a custom button with ng-click on it. Please see an example with ng-click here. Just open an image and click on ...
1
vote
2answers
7k views
Calling function without using ng-click inside ng-repeat- AngularJS
I have following code:
<div ng-repeat="dateDetails in visitsDates | orderBy : dateDetails.date | filter : contactid | limitTo : 1">
<tr>
<td>Joint Work</td>
...
0
votes
1answer
34 views
How do I add/remove a list-item onClick using Angular.js?
I am new to Angular.js and what I'm trying to do is adding a lis-item every time the user clicks on #create-new-rule but the below doesn't seem to be working.
Also, when the user click on li .delete ...
2
votes
3answers
26 views
AngularJs - Unable pass object generated by ng-repeat using ng-click
I'm new to Angular, and trying to pass some data on ng-click between controllers using a factory service, based on the data returned from the server and generated by ng-repeat in the front.
This is ...
1
vote
3answers
33 views
Angularjs count increment
I'd like to have the heart button work on the second slide just like it works on the first. I'm not really sure where to go from here as I'm a beginner at Angularjs. How can I make the button ...
1
vote
3answers
29 views
Syntax Error in Angular js passing parameter from html page http.get() data
I am trying to pass a parameter from the html page to delete a row from database.
The http.get() method returns the data for all books, and I'm passing the id for a certain book to delete it.
but its ...
0
votes
1answer
157 views
Checkbox return false instead true in ng-click
In below code $scope.checkboxModel set to false. When I click on checkbox and debug code on first click, it return false instead of true when checkbox is checked.
var app = ...
0
votes
2answers
39 views
Ng-Click not firing Button is Clicked
So have a modal with a two buttons on it. One to close the modal, and one that should fire a function when clicked. I've attached a controller to the modal, and the controller itself works, as it does ...
32
votes
4answers
22k views
Change the mouse pointer on ngclick
I've a div with the Angular ng-click directive attached to it. On hovering over this element the mouse pointer doesn't change. Is there a way to change it through CSS? I know I can simply attach an ...
0
votes
3answers
41 views
Having issue with ng-click directive of angularjs
I have two buttons, one has a click event and redirects to login page.
Another button is simply used to show pop-up.But clicking on second button also redirects me to login page
This is my code
...
0
votes
3answers
30 views
ng-click only works if I don't have a model
I have this code in my file
<div class="table-responsive">
<table class="table">
<thead>
<tr>
...
0
votes
1answer
35 views
AngularJS ng-click is not working from filter
I am trying to add a a-tag with a filter to an html-content. I'm binding the html-content with ng-bind-html and the a-tag contains ng-click. But my problem is, ng-click is not working.
I am doing ...
1
vote
3answers
59 views
Enable or Disable ng-click in Angular
Try change condition ng-click, if lenght > 1 is clickable, esle not.
ng-click="filtered.length >1 ? 'false' : 'true' || showSomething($index)"
What is wrong?
0
votes
2answers
40 views
How can I enabled a ng-click action of a <div class=“row”> according to the screen size with bootstrap classes?
I'm using angularJs and twitter Bootstrap form my app.
<div class="row">
<div class="col-xs-12">
<div class="row yo-bold">
...
0
votes
2answers
28 views
Angular ng-click onsen
So im new to coding and i cant seem to figure out some issue that i have.
<ons-row ng-click="myNavigator.pushPage('{{building.file}}.html')">
So i started and the {{ building.file }} isn't ...
163
votes
5answers
178k views
Angular JS: How/when to use ng-click to call a route?
Suppose you are using routes:
// bootstrap
myApp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
$routeProvider.when('/home', {
templateUrl: ...
0
votes
2answers
34 views
angular js with php — ng-click trigger without physical click
i just programming an contact form with angular js and php.
Its working but i need your help for one feature.
you will find a runable version on plunker: ...
0
votes
2answers
33 views
Add and remove class when element clicked with Angular
I would like to know how to add or remove a class to an HTML element when a div is clicked with AngularJS. I have a div that when clicked I need to check if it includes a class('already-member') or ...
1
vote
2answers
544 views
AngularJs get clicked element id
I have the following line:
<a href="#" id="12345" data-ng-click="ShowId()">
and in my controller I have:
$scope.ShowId = function(){
alert('clicked element id in here: 12345');
};
How ...
0
votes
1answer
30 views
AngularJS binding function to multiple elements
In jQuery I could create a web component like so:
jQuery
<script>
$(document).on('click', 'm-button[alert]', function(e){
alert($(this).attr('data-message');
});
</script>
HTML
...
0
votes
0answers
33 views
ng-click button inside function
I want to trigger an ng-click inside of a function like this:
document.getElementById('IframeDiv').innerHTML += Download this song:
"<button id='download' class='button' ...
0
votes
1answer
37 views
Why ng-click is not working in my angular datatable?
I do now know, but I think jquery is conflicting with my angular datatable, but even when I take off jquery (hide and show elements), ng-click keeps not working.
Here goes as well a printscreen from ...
4
votes
1answer
283 views
AngularJS ng-click not working, but ng-change is, when calling the same function
EDIT The code is all correct, the problem was because of including 'ngTouch', see my own answer below.
I am probably making some stupid mistake here, but for the life of me I cannot find it.
I have ...
2
votes
1answer
51 views
Why track by $index is necessary for ng-click to trigger inside nested ng-repeat
I was using ng-click inside the nested ng-repeat but found that the inner most ng-click(3rd level) was not getting triggered.
But when I used track by $index for the inner most ng-repeat, ng-click got ...
1
vote
0answers
65 views
Function getting called twice on mouse click event
I am calling a function which uploads the image on mouse click as:
<img type="file" id="uploadLogo" ng-click="triggerFileuploadClick('logoInput')" required>
<input ...
0
votes
0answers
34 views
data-ng-click mobile not tapable
So, I have a problem with button, which is clickable and works perfectly on any browser, but, I can't make it tapable anywhere on mobile.
However, you still can tap it, but you should hold it long, ...
0
votes
0answers
32 views
ng-click access child controller function from parent controller
Its a ng-repeat limiting or slicing and slice value changing on ng-click
html structure
It will work if I am moving 'next, prev' buttons into homeTeamCtrl but my html structure is something ...
-2
votes
0answers
48 views
AngularJS : why select drop-down works on touch event rather click?
Am new to this angularjs had a problem, my select option is not working as expected. Since this works on touch hence the scrolling was mot smooth (Option pops up).
<select ng-model="offlineCity"
...
0
votes
1answer
32 views
How to Change Post Variable Value in a AngularJS Controller?
I'm having two buttons, each button has ng-click event, the click event calls one method, the method has one argument.
I wish to pass the value of the argument to the Service Side via HTTP POST from ...
1
vote
3answers
405 views
How to prevent ng-click's triggering twice on label tag?
Agnular's ng-click triggers twice when i click label which has input inside in it. I've tried $event.stopPropagation(); but didn't work, how to solve this :?
I've checked this question also:
...
0
votes
1answer
22 views
Is it possible to use a bound value in ngClick
Is it possible to do the following:
<li><a ng-click="letterFilter = {section:'{{bound.value}}'}">{{bound.value}}</a></li>
to get the following output using ng-repeat and a ...
0
votes
3answers
77 views
ng-click on accordion panel header
I have been working on angularjs uib-accordion , I am able to make it functional, now when I click on panel title it expands that's fine, but what I am trying is when I click anywhere on panel heading ...