The ngClick allows you to specify custom behavior when element is clicked.

learn more… | top users | synonyms

0
votes
0answers
16 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
15 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
21 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
26 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
23 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
138 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
32 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 ...
30
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
40 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
28 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
33 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
58 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
38 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
26 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
174k 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
31 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
27 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
414 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
29 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
25 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
28 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
267 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
49 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
62 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
29 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
27 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
31 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
351 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
20 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
59 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 ...
1
vote
1answer
98 views

HIde and show images with ng-repeat and ng-show and ng-hide and ng-click based on index

I have 2 columns, first column is Unselected images and button called Select picture next to it and second column is selected images and button called Remove picture. if i click Select picture button ...
0
votes
1answer
30 views

Angular ng-click function populates table?

So I have these boxes that show minimal info for an array created using an ng-repeat. There could be 1 and 10 items returned with objects and their properties These boxes are clickable and when ...
0
votes
1answer
36 views

A function like: ng-click=“alert('Clicked')”

For a mockup I need a simple mechanism like ng-click="alert('Clicked')" but the code above is not working, can someone help me? I don't want to touch the Controller..
0
votes
2answers
35 views

Ng-click doesn't work with HTML5 video scrubber bar

I have been following thenewboston's HTML5 video tutorials and have been trying to change bits to use AngularJS. However, I am having trouble with the bar not updating when you click in a different ...
0
votes
1answer
27 views

Activate a ng-class from a controller to expand a menu

Menu with sub-menus that you can expand and highlight the chosen KPI. <li ng-repeat="(key, value) in kpis | groupBy: 'Type'" ng-class="{'active-menu-item': menu.active, 'open': ...
0
votes
1answer
22 views

optimal way to highlight selected li in Angularjs

I am using Angularjs 1.4.7 version. I have a <ul><li>..</li>....</ul> and want to apply a background-color property to the selected li. The code is as below: <ul ...
2
votes
1answer
55 views

Ng-show will not update when ng-click is inside div

I have a DIV with ng-show. When I run ng-click on an element outside of the DIV, it works fine and I can hide it. When I run ng-click on an element inside of the DIV, it does not work. I can see ...
0
votes
2answers
31 views

AngularJS - Switch between items in ng repeat with ng click

I have a small JSON Object, with country and city. The ng-repeat is calling the country. So I want now that when I click on a country item, that this item shows the city and with an other click its ...
8
votes
3answers
4k views

Prevent swipe from triggering ng-click handler

I'm working on implementing an iOS-like swipe-to-delete gesture on HTML table rows. For example, a leftwards swipe on Site11 will turn it from a standard row: into a delete-able row: I have ...
0
votes
0answers
14 views

Node server restart causing multiple issues: ng-click, ng-model for one element only not recognised

The application was working fine until I restarted the node server. I tried pulling my last commit from git (which worked fine) and running it, but the same error. 'npm start' gives an error : could ...
38
votes
5answers
112k 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 ...
-1
votes
1answer
71 views

Linking one controller to another to call service on ng-click

I have two templates with respective controllers and service files. One template's(fleetListTemplate) controller(fleetListController) loads data from its service file(fleetService) and displays in ...
1
vote
1answer
676 views

angular: calling a function with parameter using ng-click inside directive template

new to angular here :) I have a custom directive that have an ng-click in it which calls a function I have defined in a controller (not the directive controller). This is the html view: ...
4
votes
4answers
1k views

Pass callback function to directive

I'm trying to pass a callback function from a controller to a directive. Here's the callback function code: $scope.onImageSelect = function(image) { alert('SET'); $scope.card.image = image; ...
33
votes
5answers
66k 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?
0
votes
2answers
29 views

Select element not accepting clicks when ng-click is in parent element

Quick question really. I've noticed that when I have an ng-click above a select element, clicking on the select list does not change the value. html: <div ng-controller="MyController" ng-app> ...
4
votes
5answers
4k views

AngularJS error: TypeError: v2.login is not a function

I would like to call the login function when I click the login button but keep getting the error message in the title. Can someone point out the error in my script? login.js code below: /*global ...
0
votes
1answer
53 views

angularjs ng-click and changing view

I am new in angular. I click a button using ng-click. I send it paramter. Every is ok. <div class="item item-text-wrap" ng-click="GetRecordPDF({{item.RecordId}})"></div After this, I need ...