I have code in html like
<div id="edit" ng-click="editFunction($event)">
<span id="1">
click1
</span>
<span id="2">
click2
</span>
<span id="3">
click3
</span>
<span id="4">
click4
</span>
....
</div>
in controller.js
myDIV.controller('control',function($scope){
$scope.editFunction($event){
alert($event.target.id);
}
});
When user clicks in the div tag he should click on any of the span tags. Using the code we are able to get the div id. But actually I need to know which span is clicked. Means id="1" or 2 or 3 ... Thank you.