SO - 20814420
by Arun P Johny
HTML
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.2/angular.js"></script>
<a data-id='102' ng-click='delete($event)'>Delete</a>
JavaScript
var app = angular.module('my-app', [], function () {
})
app.controller('AppController', function ($scope) {
$scope.delete = function (e) {
var id = $(e.target).data('id');
console.log(id); // I want to get 102 as the result
};
})