How to trigger share options in angularjs with ionic?

1

Good evening

I have a mobile app, I have seen in some apps that when I click on share it appears the options of the installed apps like facebook on the phone to share would like to know how I can trigger these options to do sharing for example in social networks like facebook.

    
asked by anonymous 24.09.2015 / 00:24

1 answer

2

Use ngCordova, with the plugin Social Sharing

To do this, just install ngCordova with bower and add the plugin

bower install ngCordova
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git

Add the script to your index.html

<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>

And add the dependency in your app.js

angular.module('myApp', ['ionic', 'ngCordova'])

In the controller use the $ cordovaSocialSharing service. The documentation on how to use is in the github of the project: link

    
24.09.2015 / 00:38