Reputation: 47
a href tag
<a href="#" ng-click="getUserSkills($event);" data-id="{{iUserInfoID}}" class="accordion-toggle" title="Skills" data-toggle="modal" data-target="#skillModal">Skills</a>
Angular Controller
$scope.getUserSkills= function (e) {
e.preventDefault();
$scope.UserInfoId = $(this).data('id');
alert($scope.UserInfoId)
};
Upvotes: 0
Views: 766
Reputation: 2290
You can just remove the href="#"
from the link.
<a ng-click="getUserSkills($event);">My Link</a>
But I would suggest you use just a span
or something similar instead. There is no reason why you should try to suppress a default functionality of a
when you can use any other HTML tag.
Upvotes: 2