How to share the url in whatapp using PWA

Hello ,

I am trying to share the URL in whatapp using the PWA . I am using the below code to achieve it … it works with the static url or text but when I try to make the text dynamic it does not work . Here the code I am using

The below code does not work as I am passing dynamic text subheading

<a href="whatsapp://send?text={{subheading}}" ion-button clear small data-action="share/whatsapp/share">
	  <ion-icon name='logo-whatsapp'></ion-icon>
	&nbsp;Share
 </a>

The below code works

<a href="whatsapp://send?text=Hello" ion-button clear small data-action="share/whatsapp/share">
	  <ion-icon name='logo-whatsapp'></ion-icon>
	&nbsp;Share
 </a>

Please help me understand what am I doing wrong here …

1 Like