angularjs - How can i change line between merge scopes? -
$scope.message = $scope.share.name_en.concat($scope.share.address_en); $scope.shareviasms = function() { $cordovasocialsharing.shareviasms($scope.message, null) }
the function work perfect , show $scope.message merge 2 scopes change line or leave space between $scope.share.name_en , $scope.share.address_en
you can use array.join
:
$scope.message = [$scope.share.name_en, $scope.share.address_en].join(" ");
or (as said comments)
$scope.message = $scope.share.name_en + ' ' + $scope.share.address_en;
Comments
Post a Comment