Javascript 与Cordova Social Share共享Json数组
我正试图在whatsapp、facebook等网站上与Cordova Social share分享一系列产品。 我试着把它串起来,我试了很多东西,但似乎没有任何效果,它发送的唯一东西总是一个“[]” 这是我的html按钮Javascript 与Cordova Social Share共享Json数组,javascript,angularjs,ionic-framework,cordova-plugins,Javascript,Angularjs,Ionic Framework,Cordova Plugins,我正试图在whatsapp、facebook等网站上与Cordova Social share分享一系列产品。 我试着把它串起来,我试了很多东西,但似乎没有任何效果,它发送的唯一东西总是一个“[]” 这是我的html按钮 <button id="comp-list" ng-click="OtherShare()" class="button button-block button-success item-icon-left" > <i clas
<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');
};
for(var i=0;i在通过社交媒体共享时,您需要严格控制文本
window.plugins.socialsharing.share(JSON.stringify($scope.shareList), null, null, 'www.google.com');