diff --git a/src/app/league-table/league-table.page.html b/src/app/league-table/league-table.page.html
index ce64369..8dbfed6 100644
--- a/src/app/league-table/league-table.page.html
+++ b/src/app/league-table/league-table.page.html
@@ -4,7 +4,7 @@
IPL Standings Table
Season 2021
-
+
diff --git a/src/app/league-table/league-table.page.ts b/src/app/league-table/league-table.page.ts
index cccfff3..c9f0040 100644
--- a/src/app/league-table/league-table.page.ts
+++ b/src/app/league-table/league-table.page.ts
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';
import { MatchService } from '../services/match.service';
import { ToastService } from '../services/toast.service';
+import { SocialSharing } from '@ionic-native/social-sharing/ngx';
export interface MobileAppStanding {
id: string;
@@ -31,9 +32,24 @@ export class LeagueTablePage implements OnInit {
constructor(
private location: Location,
private matchService: MatchService,
- private toastService: ToastService
+ private toastService: ToastService,
+ private socialSharing: SocialSharing,
) { }
+
+ share() {
+ let message = 'IPL League Table Standings 2021- ';
+
+ for (let i = 0; i < this.standings.length; i += 1) {
+ message += this.standings[i].short_name + (i + 1 === this.standings.length ? '.' : ', ');
+ }
+
+ message += ' To know more please visit the link! #SaddaPunjab';
+
+ this.socialSharing.share(message, '', '', 'https://www.punjabkingsipl.in/points-table');
+ console.log(message, '', '', 'https://www.punjabkingsipl.in/points-table');
+ }
+
ngOnInit() {
this.matchService.getLeagueTable().then((data: Array
) => {
this.standings = data;