I have this code in the view:
<span id="l3-bridge" ng-click="redirect('l3bridge')" class="menu-opt">
<img class="marginleft" src="/web/bundles/lima3main/images/icon-l3bridge.png">
L3 Bridge
</span>
And this is my redirect function in angular:
$scope.redirect = function(url) {
var element = angular.element( $(this) );
console.log(element);
}
What i need to do is get the id value (in this case l3-bridge) from the element that i clicked.
Is there any equivalent of $(this).attr('id')
from jQuery to AngularJS ?
Edit: I mean, i need the element's id of the view. How can i do it with angular?