I have a mobile app and am using the ngcordova
plugin, cordovaSocialSharing
. But when I did as the documentation, when I click on sharing nothing happens.
Controller
.controller('ShareCtrl', function($ionicPlatform, $scope, $cordovaSocialSharing) {
$ionicPlatform.ready(function() {
var message = 'This is a demo message';
var subject = 'This is a demo message';
var link = 'http://somerandom.link/image.png'; // fake image
$scope.nativeShare = function() {
$cordovaSocialSharing
.share(message, subject, link); // Share via native share sheet
};
//checkout http://ngcordova.com/docs/plugins/socialSharing/
// for other sharing options
});
})
Button
<div ng-click="shareAnywhere()" ng-controller="ExampleController" style="text-align: center">
<i style="font-size: xx-large" class="ion-android-share-alt"></i><br>
Partilhar
</div>