Reputation: 1
I want to remove href attribute from 'a' tag (work like a plain text) and I use this code in my directive file:
.directive('rhHasLinkFor', function () {
return{
priority: 10000,
restrict: 'A',
compile: function (el, attr) {
el.href.remove();
}
}
});
but it doesnt work,what's the problem?
Upvotes: 0
Views: 690
Reputation: 5561
Try
.directive('rhHasLinkFor', function () {
return{
priority: 10000,
restrict: 'A',
compile: function (el, attr) {
el.removeAttr('href');
}
}
});
Upvotes: 2