mirror of
https://github.com/arnaucube/openEventsPlatformApp.git
synced 2026-02-07 03:36:44 +01:00
socialsharing de events començat
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
var urlapi = "http://localhost:3000/api/";
|
||||
//var urlapi = "http://localhost:3000/api/";
|
||||
var urlapi = "http://192.168.1.35:3000/api/";
|
||||
|
||||
|
||||
|
||||
angular.module('app', [
|
||||
'ionic',
|
||||
'pascalprecht.translate',
|
||||
'ngCordova',
|
||||
'app.menu',
|
||||
'app.main',
|
||||
'app.events',
|
||||
|
||||
@@ -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