我正在使用此插件在离子应用程序中实现社交共享
在我的页面内,我使用离子幻灯片,
<ion-slides>
<ion-slide *ngFor="let item of strings">
<div>
{{ item }}
</div>
</ion-slide>
</ion-slides>
这是我的打字稿文件,用于将数据放入幻灯片
export class Birthday {
strings : Array<string>;
constructor(public navCtrl: NavController, public navParams: NavParams) {
this.strings = new Array<string>();
this.strings.push('text1');
this.strings.push('text2');
this.strings.push('text3');
this.strings.push('text4');
}
}
现在在使用社交分享插件时如何在消息字段中获取当前幻灯片数据
share(**slide data heree**, subject, file, link) {
this.platform.ready().then(() => {
if(window.plugins.socialsharing) {
window.plugins.socialsharing.share(message, subject, file, link);
}
});
}