0

I am adding share button in my website, and my share URL has some parameters. However, on phone extra parameters in the URL are ignored.

my button :

<a class='whatsapp-icon' href='whatsapp://send?text=https://www.exmaple.com/#/lat=10.11,long=20.11'></a>

When I open this link in webpage link it open fine with all parameters, but on the phone link comes as just www.exmaple.com and parameter '#/lat=10.11,long=20.11' is ignored in share window.

This is angular 1.xx webpage where share button is present.

BDL
  • 21,052
  • 22
  • 49
  • 55
Don
  • 1,334
  • 1
  • 10
  • 18

2 Answers2

1

LATEST WAY TO DO THIS

<a *ngIf="isWhatsAppIconVisible" href="https://api.whatsapp.com/send?text=check out this link : {{shareableUrl}}" data-action="share/whatsapp/share">
    <img src="assets/whatsapp.png" alt="whatsapp" /> 
</a>
kumar kundan
  • 2,027
  • 1
  • 27
  • 41
0

You need to sanitize anchor href. Here you can find a solution for your problem:

Whatsapp Sharing in AngularJS

Keep rocking!

Community
  • 1
  • 1
Jonathan Brizio
  • 1,087
  • 1
  • 14
  • 28