$scope.message = $scope.share.Name_en.concat($scope.share.Address_en);
$scope.shareviasms = function() {
$cordovaSocialSharing.shareViaSMS($scope.message, null)
}
该函数工作正常并显示$ scope.message,它与2个作用域合并,但我想在$ scope.share.Name_en和$ scope.share.Address_en之间改变行或留空间
答案 0 :(得分:0)
您可以使用array.join
:
$scope.message = [$scope.share.Name_en, $scope.share.Address_en].join(" ");
或简单地(如评论所述)
$scope.message = $scope.share.Name_en + ' ' + $scope.share.Address_en;