JavaScript Get the Attribute ID of Button in Bootstrap & AngularJS button attributes bootstrap

I have created a Button in Bootstrap and assigning an attribute to it. Upon clicking the button, I wish to get the attribute value in the function. However, when I pass $element.currentTarget to function, I a getting undefined value in the function. Please let me know what is wrong with my approach. Below is the code

<div >
<a class="btn btn-info btn-circle text-uppercase" target='_blank' href="#" id="reply" ng-click="addReply($element.currentTarget)" data-id = "{{ comment.comment }}"><span class="glyphicon glyphicon-share-alt"></span> Reply</a>
<a class="btn btn-warning btn-circle text-uppercase" data-toggle="collapse" target='_blank' href="#replyOne" aria-expanded="true"><span class="glyphicon glyphicon-comment"></span> 2 comments</a>
</div>

$scope.addReply = function(item) {  
    var id = angular.element(item).data('id');
    alert(id);      
};
Answer:1

I have this code and I cannot get the second time to format properly: setInterval(function() { var local = new Date(); var localdatetime = local.getHours() + ":" + local.getMinutes() + ":" +...

I have this code and I cannot get the second time to format properly: setInterval(function() { var local = new Date(); var localdatetime = local.getHours() + ":" + local.getMinutes() + ":" +...

  1. format javascript date object
  2. format javascript date string
  3. format javascript date time
  4. format javascript date mm/dd/yyyy
  5. format javascript date output
  6. format javascript date yyyy-mm-dd
  7. format javascript date iso 8601
  8. format javascript date dd/mm/yyyy
  9. format javascript date with moment
  10. format javascript date.now
  11. javascript format date with timezone
  12. javascript format date locale
  13. javascript format date from timestamp
  14. javascript format date time string
  15. javascript format date iso
  16. javascript format date function
  17. javascript format date month name
  18. javascript format date utc
  19. javascript format date dd mmm yyyy
  20. javascript format date without time

(Note: I asked this question on https://github.com/gkz/LiveScript/issues/731 as well) When I use LiveScript in an html file directly, I have no way to run livescript code immediately on seen. For ...

(Note: I asked this question on https://github.com/gkz/LiveScript/issues/731 as well) When I use LiveScript in an html file directly, I have no way to run livescript code immediately on seen. For ...

Are there replacements for the domReady event and the onMutate function in Polymer 0.9? In Firefox the attach event seems to work, but in Chrome the children are not in a proper state at the time of ...

Are there replacements for the domReady event and the onMutate function in Polymer 0.9? In Firefox the attach event seems to work, but in Chrome the children are not in a proper state at the time of ...

I have some route: when('/tvtest/:userid', {templateUrl: 'template/usertv', controller: SomeTest}). which loads some html with emebedded kendo-ui controls: <html> <head> <title&...

I have some route: when('/tvtest/:userid', {templateUrl: 'template/usertv', controller: SomeTest}). which loads some html with emebedded kendo-ui controls: <html> <head> <title&...

  1. kendo treeview angularjs checkbox
  2. kendo treeview angularjs example