与科尔多瓦共享一个Json数组社交共享
问题描述:
我想与WhatsApp,Facebook等共享科尔多瓦社交共享产品列表。 我试着Stringfying它,我尝试了很多东西,但似乎没有什么工作,它发送的唯一的事情就是总是“[]”与科尔多瓦共享一个Json数组社交共享
因此,这里是我的html按钮
<button id="comp-list" ng-click="OtherShare()" class="button button-block button-success item-icon-left" >
<i class="icon ion-share"></i>
Share
</button>
,这是部分负责在我的控制器
for(var i=0; i<$scope.products.length; i++){
var prodValue = {price:$scope.products[i].price, quantity:$scope.products[i].quantity};
prodValue.price= $scope.products[i].price;
prodValue.quantity= $scope.products[i].quantity;
$scope.shareList[$scope.products[i].name] = prodValue;
}
$scope.OtherShare=function(){
window.plugins.socialsharing.share($scope.shareList, null, null, 'www.google.com');
};
因此,任何人知道我应该如何分享“shareList”使用这个插件的阵列? 任何可以帮助我共享whatsapp上shareList的内容的东西! =)
谢谢:)
答
需要粘稠的文本,同时通过社交媒体分享
window.plugins.socialsharing.share(JSON.stringify($scope.shareList), null, null, 'www.google.com');