如何更改合并范围之间的界限?

时间:2016-02-08 10:29:49

标签: angularjs cordova cordova-plugins

$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之间改变行或留空间

1 个答案:

答案 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;