Social sharing witk Jbackapp exemple
-
alphaa
-
Topic Author
-
Offline
-
Junior Member
-
Less
More
-
Posts: 36
-
Thank you received: 0
-
-
7 years 10 months ago #5930
by alphaa
Hi,
I want to share post K2 with "social sharing".
exemple :
controller :
.controller('SectionsCtrl', function($scope, $state, $stateParams, $ionicPopup, $ionicModal, $log, $timeout, $ionicPopup, FeedService) {
var url = 'myUrl';
var link = $scope.url
var data = {};
//debut
$scope.items = [];
$scope.successGetSectionContent = function(data) {
$scope.maxIntro = 100;
$scope.items = data.items;
for (var i = 0; i < $scope.items.length; i++) {
$scope.items[i].content = $scope.items[i].content.replace(/<[^>]+>/gm, '');
if ($scope.items[i].content.length > $scope.maxIntro) {
$scope.items[i].content = $scope.items[i].content.substr(0, $scope.maxIntro) + '...';
}
}
};
data = data.items;
$scope.share = function() {
window.plugins.socialsharing.share(null, null, null, data.link);
}
Help me for sharing items
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
Time to create page: 0.129 seconds