我正在尝试在whatsapp、facebook等网站上与Cordova Social Sharing分享产品列表。我尝试将其串行化,尝试了许多方法,但似乎都不起作用,它发送的唯一内容始终是一个"[]“
这是我的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内容的东西!=)
谢谢:)
发布于 2017-01-24 17:36:16
在通过社交媒体进行共享时,您需要将文本串起来
window.plugins.socialsharing.share(JSON.stringify($scope.shareList), null, null, 'www.google.com');https://stackoverflow.com/questions/41809916
复制相似问题