1

I have this in line of code

<a class="btn btn-block btn-lg" ng-class='login.anchorClass' ng-href="{{login.idp_authnrequest_url}}"><img src="{{login.file_name}}"/>{{login.name}}</a>

But this displays url in bottom left which I want to hide ( that's the requirement). Can anyone help with this?

Since those links comes from ng-repeat I tried onclick="location.href='({{login.idp_authnrequest_url}})'"

but that only opens last url on every anchor tag click. Also thought about using button instead of anchor tag but since I have multiple button how would that work?

il_raffa
  • 5,090
  • 129
  • 31
  • 36

1 Answers1

0

Welcome to Stack Overflow. Have you try using jquery:

$(function(){
           $("a").each(function (index, element){
               var href = $(this).attr("href");
               $(this).attr("hiddenhref", href);
               $(this).removeAttr("href");
           });
           $("a").click(function(){
               url = $(this).attr("hiddenhref");
              window.location.href = url;
           })
       });

This works for me. Here the reference answer https://stackoverflow.com/a/56340724/13955999

whatISboolean
  • 57
  • 2
  • 8