JavaScript how to get DOM element with ng-click element with click event,element click intercepted,element click intercepted

Please try following snippet.

var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
    $scope.weirdFunction = function(element) {
     console.log(element);
    }  
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<button ng-click="weirdFunction($event.currentTarget)">Pretty Button</button>
 </div>
Answer:1

Pass $event object to weirdFunction. $event.target gives the element on which the click was triggered.

<button ng-click="weirdFunction($event)">Pretty Button</button>
Answer:2

I am working on a plugin for an internal tool that keeps track of how long it takes to work on specific tasks. I am presenting a visual reference of the time its taken but using the timestamps in the ...

I am working on a plugin for an internal tool that keeps track of how long it takes to work on specific tasks. I am presenting a visual reference of the time its taken but using the timestamps in the ...

I have a products array.it consist of name,price,qty. i am Using limitTo When name length reaches to 20. when hover on product how to show full name please hlep me? <p class="hover">{{ item....

I have a products array.it consist of name,price,qty. i am Using limitTo When name length reaches to 20. when hover on product how to show full name please hlep me? <p class="hover">{{ item....

  1. show full name on desktop icons windows 10
  2. show full name iphone messages
  3. show full name on hover
  4. show full name on desktop icons
  5. show full name of file
  6. show full name on desktop icons mac
  7. show full name
  8. show full name in imessage
  9. show full name facebook
  10. show full name in iphone
  11. show full name on whatsapp
  12. show full name email
  13. show full name jira
  14. show full name messages
  15. squeue show full name
  16. show full file name windows 10
  17. big show full name
  18. qstat show full name
  19. show full month name in php
  20. show full file name mac

How do I generate a list, edit some data, and push then it to db? When I hit 'submit', the changes made have no effect. Example: <div id="demo"> <button v-on="click: generateProducts">...

How do I generate a list, edit some data, and push then it to db? When I hit 'submit', the changes made have no effect. Example: <div id="demo"> <button v-on="click: generateProducts">...

  1. laravel update model unique

Trying to use browserHistory.push method to change my route programmatically. It will change the route (per browser address bar) but doesn't update the view. Here's my code App.jsx const AppStart ...

Trying to use browserHistory.push method to change my route programmatically. It will change the route (per browser address bar) but doesn't update the view. Here's my code App.jsx const AppStart ...

  1. react router browserhistory push
  2. react router browserhistory listen
  3. react router browserhistory vs hashhistory
  4. react router browserhistory
  5. react-router browserhistory undefined
  6. react-router browserhistory api
  7. react router browserhistory push not working
  8. react-router browserhistory not found
  9. react router browserhistory replace
  10. react router browserhistory push state
  11. react router browserhistory hashhistory
  12. react router browserhistory back
  13. react router browserhistory refresh
  14. react router browserhistory v4
  15. react router browserhistory basename
  16. react router browserhistory redirect
  17. react router browserhistory not working
  18. react router browserhistory pop
  19. react-router-dom browserhistory
  20. react router 4 browserhistory