× Requests and support related to jBackend.

Social sharing witk Jbackapp exemple

  • alphaa
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #5930 by alphaa
Social sharing witk Jbackapp exemple was created 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.

More
7 years 3 months ago #5932 by admin
Replied by admin on topic Social sharing witk Jbackapp exemple
Thanks for sharing.

Please Log in or Create an account to join the conversation.

Time to create page: 0.144 seconds