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

learn more… | top users | synonyms

0
votes
1answer
26 views

angular ng-click ng-show stopped working

I have this small code fragment: <li ng-if="vm.data.Description" ng-click="expand=!expand">{{vm.data.Description}}</li> <li ng-if="vm.data.LongDescription" ng-show="expand">{{vm....
0
votes
0answers
19 views

Angularjs: ng-click that changes an ng-repeat scrolls the page to top but I don't want it

I have this code: <ul class="tab"> <li><a href="javascript:void(0)" class="tablinks" ng-class="{ active: categoria == 1 }" ng-click="cambiaCategoria(1)">Link 1</a></li&...
0
votes
2answers
27 views

Change the background color of a div in angular

I would like to change the bg colour of div when clicked on that particular div. The div is placed in a slider panel. For example, if I click Home, the slider gets hidden and the home panel opens up. ...
0
votes
1answer
37 views

ng click show div ng-repeat item scroll failed

I am having a problem with click on an item within a ng-repeat. What happens is that when I click on an icon, it should display a div that is hidden, for each item there is a div. The problem is that ...
0
votes
0answers
57 views

ng-click is not working as expected

I have been trying to implement a mock up angular project.I am using ng-click event to a button so when it is clicked it will open a edit modal that will show the respective name of the enterprise, ...
1
vote
4answers
37 views

like dislike functionality in AngularJs

I am trying to achieve likes / dislikes functionality but it's not working. I am newbie for this kind of functionality. I've added my snippet about what exactly I am trying to do. Please do help me ...
0
votes
1answer
35 views

AngularJS ng-click function not bringing info to new view

I am trying to make a friends list. I have it set up so a user can search for friends and click on their image to see their profile, this takes them to the profile where there is information displayed ...
0
votes
0answers
23 views

How do I send a div value to a function in angular controller

<!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <body> <script> var app = angular.module("...
17
votes
5answers
59k views

AngularJS : ng-click not working

I am new in AngularJs, ng-click is not working as expected. I searched on the internet , Follow the tutorial , (that was working) - but this is not working!!! My Code: <div class="row" ng:...
0
votes
0answers
49 views

Filter inside ng-click (which is inside ng-repeat) is not working

I have html as below: <ul style="list-style: none;"> <li class="" ng-repeat="value in player"> <span ng-model="playerType" name="type">{{value.type}}</span> ...
0
votes
1answer
57 views

Angular - How to get angular directive to trigger after ng-click handler scope function?

Scenraio I am pretty new to Angular and have the following issue. I want to trigger a directive to change color and add an image on a button. I can not get the first if condition to trigger this ...
0
votes
1answer
46 views

NG-CLICK need double click to be trigged

I have a simple list for my navbar and I use an ng-click and ng-blur to change the selected option in the list. Unfortunately it needs a double click to be changed and I cannot explain why. [1]: http:...
0
votes
1answer
52 views

Angularjs ng-click not working

Im trying to update some data when the map button is clicked, but the ng-click function doesnt seem to work. Below is my code. <textarea id="xmltest" class="form-control" style="margin-top:2%; ...
2
votes
1answer
49 views

Angular JS with PHP with Input field and Submit Button

I have UI with Input field and Submit Button,And After Entering Number in field and clicking on Submit Button. I want this to go to first.php file and second.php depends on the first.php response. At ...
0
votes
3answers
524 views

ng-click Error: [$parse:syntax] Syntax Error: Token 'Object' is unexpected, expecting []]

I'm reverse geocoding when a user clicks on a point on a google map like so: geocoder.geocode({'location': latlng}, function(results, status) { if (status === google.maps.GeocoderStatus....
0
votes
1answer
37 views

AngularJS JSON load from file with ng-click

Currently I want to show HTML table by parsing JSON data from file using Angular JS, And It's not working can someone please help me? And Also As a Enhancement How Can I get the 2 Divs for 2 ...
1
vote
4answers
33 views

Values are not automatically assigning in checkbox

I have a checkbox to show deactivate account , when check box is selected in request I need to send activationstatus as false for showing deactivate account and when unchecked it should pass value as ...
0
votes
2answers
61 views

Get the ID of clicked button only in Angular Js

In the snippet bellow, if you click one of the buttons, then all three buttons will re-act and rotate with the clicked one. How can I rotate only the clicked one? I tried to pass unique id of each ...
1
vote
1answer
1k views

How to override an ng-click directive to not automatically run $apply

Found some close questions , but not exactly the one I need to ask. I have multiple elements with ng-click events. For a majority of them (of a specific class), I don't need to actually run an ...
0
votes
1answer
93 views

Angular 2 - How to add (click) event to dinamycally added div

I try to append a div into my page via a function in my component like this : showTile($event: any,id: number){ $($event.target).append('<div (click)="somefunction(id)"></div>')) } ...
3
votes
2answers
1k views

AngularJS - ng-click over ng-click

I have a html code like the following: <div class="outerdiv" data-ng-click="resetText()"> <div class="innerdiv" data-ng-click="showText()"> {{ text }} </div> </...
4
votes
2answers
5k views

ng-click on firing on mobile or tablet devices

On page load i have a controller that calls a service and then binds the returned data to some $scope.objects: app.controller("MainController", function($scope, $http, serviceGetData) { ...
0
votes
2answers
51 views

Trigger events on every ng-click

Is there any way to trigger a function from all ng-clicks in an AngularJS application? I know I can trigger the code by adding it in the functions currently bound to their specific ng-ifs, but if ...
3
votes
1answer
203 views

How to setTimeout before the AngularJS ng-click trigger

I need a way to set a timeout before the ng-click is triggered, something like: window.setTimeout("ng-click='myCtrl.myFunction()', 1000") I don't think it is possibile but I really need to have ...
0
votes
0answers
30 views

2 ng-clicks calling same function in ng-repeat Ionic AngularJs

enter image description here We have Plus and Minus buttons inside ng-repeat. Each button should increment or decrement value inside the particular textbox. There are 2 functions for increment and ...
0
votes
2answers
26 views

How to dynamically add filter queries in angular?

I'm wondering if I can dynamically change filter queries in angular. If not, what are the other options? <a ng-repeat="topic in data.topics"> <button ng-click="topicFilter= {topic: '{{topic....
0
votes
1answer
15 views

dynamic load function for ng-click with evel

You will find plunder of this here : plunker UI is like this : http://i.stack.imgur.com/7H1b3.png I have ng-repeat with which I want to create ng-click in directive template. Template name as ...
0
votes
2answers
67 views

Ignore ng-click when opening dropdown

I have a list with options, which I loop into a select with ng-options. Then I would like to call a function, when I click on one of the options. I tried it first with ng-change, but the problem I had ...
3
votes
2answers
4k views

Pass object in function with ng-click

I have template which starts like : <li class="list-group-item" ng-repeat="question in question.ChildQuestions" collapse-toggler ng-click="collapseQuestion(this);"> ... In collapseQuestion i ...
0
votes
0answers
17 views

How to control when the child elements executes the same ngClick event as the parent?

I have a user avatar that accepts an ngClick event to show a menu with user options. Over the avatar, in the corner of it, is an online/offline icon for the user; just a circle that can be either red ...
0
votes
2answers
21 views

How to properly use ng-click in angularjs?

Hi I have been learning angularjs over a week now. I have a question on ng-model. my question is I have a field called firstname:. When I give the name and hit the submit button. The firstname has to ...
2
votes
2answers
3k views

append a html include ng-click in angularjs

i have this code in mycontroller i will add this html() to my html, all it right just ng-click dos not work ! have you an ideas why ng-click dos not work var html='<div ng-click="selectedValue('+...
0
votes
0answers
11 views

In Angularjs which of ng-clikc and href has higher priority

Let's say that i have this tag : <a ng-click="leavingMenuPage()" href="#/app/interview" > <i class="icon ion-android-person"></i> <p class="pFont" >...
0
votes
0answers
31 views

Angular 1 isolated scope with outside ng-click bing to inner ng-show

I'm trying to make my first app with Angular 1 and I can't find how to pass the ng-click directive to isolated scope in my directive. It's a weather app and those are my ng-clicks outside the ...
1
vote
2answers
26 views

Redirect to UI-Route after Login Successfully

How to redirect to Home Page after Login successful, I am using UI-router and below is my ui-router code. var myrouting=angular.module('routingDemoApp', ['ui.router']) myrouting.config(['$...
0
votes
0answers
63 views

ngClick not working on ngRepeat

I have an iterating table of items. Right now, when you click an item, nothing is happening. After some testing, I see the ngClick directive is not firing. For what its worth, all my other Angular on ...
0
votes
0answers
43 views

ngDialog is not working

How to call ngDialog model form when user clicks on a HyperLink. Below is my angularJs Code. SignupDialog is not working? <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <...
21
votes
4answers
27k 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
2answers
32 views

How to change the class using click and hovering

View: <a ng-repeat="control in controls | filter:name" ng-href="#{{control.id}}" ng-click="restart(control.name)" ng-class="{active: control.name == selected}">{{control.name}} controller- ...
1
vote
3answers
53 views

ng-click not working, trying to replace an image on click

I'm new of Angular JS, Well I'm trying to replace an image on click. i.e.,One Click on Img1 i would replace the previous image by Img1 and so on. To achieve this I'm using ng-click. The thing is even ...
2
votes
1answer
52 views

ng-click doesn't invoke function in md-dialog

I have problem with ng-click in md-dialog. Here is my HTML code dialog.html <md-dialog-content layout="column"> <div class="md-dialog-content"> <md-input-container> ...
59
votes
7answers
111k 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
1answer
18 views

Ng-click not up to date?

I have a select of users and based on the selected user it shows certain buttons. The button their titles and id's are in objects that come from ng-repeat. When clicked on a button it passes an id to ...
0
votes
0answers
68 views

Angular date filter on ng-click

I want to filter the records by the reply time monthly. If I click a date on the left menu. The table should display the records only in that specific month. I have a search filter also. The ...
1
vote
4answers
109 views

Angular: ng-click parameter is undefined, which is inside ng-repeat

I came across a problem when I try to pass param from ng-click to my function. I couldn't get my param. I am a new learner of Angular.js. So I think I may lack of basic understanding for ng-click ...
0
votes
2answers
32 views

JavaScript Button link prevent scroll on click

I have an Html link that I want to use as a button: <a href="javascript:void(0)" class="btn btn-link" title="Click to copy" ng-click="copyToClipboard(item, $event)">{{ "{" + item.campaignGuid + ...
-1
votes
1answer
35 views

Angular: Can't use value of ng-repeat in ng-click

I want to have a div show up when clicked on the title, to do this i wanted to pass the value of the ng-repeat in the ng-click. But for some reason it doesn't get it through. Here's the code of my ...
2
votes
7answers
86 views

Is there a drawback of calling more than one function in a ng-click directive?

We are calling two functions in a single ng-click directive, is there any gotcha that we should be aware of? <button type="button" ng-click="func1(); func2();">Click</button> We could ...
0
votes
4answers
57 views

how to use dynamic variables on ng-click angular?

Well, I don't know how I can use "dynamic" variables on ng-click attribute. In this case, i want update variable from reference in ng-click ng-if etc. My idea is update variables from reference and ...
267
votes
4answers
131k views

AngularJS ng-click stopPropagation

I have a click Event on a table row and in this row there is also a delete Button with a click Event. When i click the delete button the click Event on the row is also fired. Here is my code. <...