Json with Share button


#1

Hello,

I have a Json link in which there is a link of the article from the official website.

What i’m trying to do :
{ In my app, there are a lot of articles, at the end there is a share button, when you click on the share button, it redirect you to the article from the official site. }

I’m new on ionic and i have no idea how to do this.

article.ts

  SocialShare(b) {
      this.socialSharing.share("Look at this !", null, null, b).then(() => {
        console.log(b,"shareSheetShare: Success");
      }).catch(() => {
        console.error(b,"shareSheetShare: failed");
      });
  }

article.html
<button ion-button color=“Orange” name=“md-share” (click)=“SocialShare({{data.link}})”>Share

Thanks !


#2

Change to:

<button ion-button color=“Orange” name=“md-share” (click)=“SocialShare(data.link)”>Share</button>

#3

---------------- Thanks it works !


#4

Please mark answer as solution.
Thanks


#5

How we do that sir ?