mirror of
https://github.com/arnaucube/openEventsPlatformApp.git
synced 2026-02-07 19:56:40 +01:00
socialsharing de events començat
This commit is contained in:
@@ -2,7 +2,7 @@ angular.module('app.event', ['pascalprecht.translate', 'ui-leaflet'])
|
||||
|
||||
.controller('EventCtrl', function($scope, $http, $ionicModal,
|
||||
$stateParams, $timeout, $ionicLoading, $filter,
|
||||
leafletData, leafletBoundsHelpers) {
|
||||
leafletData, leafletBoundsHelpers, $cordovaSocialSharing) {
|
||||
|
||||
|
||||
$scope.center= {
|
||||
@@ -54,4 +54,18 @@ angular.module('app.event', ['pascalprecht.translate', 'ui-leaflet'])
|
||||
};
|
||||
$scope.doRefresh();
|
||||
|
||||
|
||||
$scope.share = function(){
|
||||
var message = "hola, això ho comparteixo";
|
||||
var subject = 'compartició';
|
||||
var file= ['',''];
|
||||
var link = "http://duckduckgo.com";
|
||||
$cordovaSocialSharing
|
||||
.share(message, subject, file, link) // Share via native share sheet
|
||||
.then(function(result) {
|
||||
// Success!
|
||||
}, function(err) {
|
||||
// An error occured. Show a message to the user
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user