pedroabreu / ion-gallery

Ionic gallery directive
MIT License
124 stars 61 forks source link

Social Share #41

Closed Atanasovski closed 8 years ago

Atanasovski commented 8 years ago

Hi, I try to add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git within ion-gallery, so the image could be shared via fb, whatsapp etc... But I did't success .

Does anyone have solution?

pedroabreu commented 8 years ago

Have you tried using ng-cordova instead ? http://ngcordova.com/docs/plugins/socialSharing/

Without seeing what you've tried to do it's hard to suggest solutions

Atanasovski commented 8 years ago

I managed to include https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git with onclick. I change ion-gallery.min.js Example: From: <img ng-src="{{single.src}}">\n To: <img ng-src="{{single.src}}" onclick="window.plugins.socialsharing.share(null, null, 'https://www.google.nl/images/srpr/logo4w.png', null)">\n Like this is working, it shares and ondoubletap it zooms. But, I need dynamic image from {{single.src}} and I can't assigne it to onclick event: <img ng-src="{{single.src}}" onclick="window.plugins.socialsharing.share({{single.src}})">\n

If I change to ng-click or on-hold than doesn't work, only doubletap in this case:

<img ng-src="{{single.src}}" ng-click="window.plugins.socialsharing.share({{single.src}})">\n

Any suggestion?

pedroabreu commented 8 years ago

Don't you also need to pass the null values ?

Try placing the ng-click on the parent div instead of the img element

Atanasovski commented 8 years ago

I try to place ng-click also on parent div, but no success, The share is working only onclick (if I put image) but how can I assign {{single.src}} value to onclick? onclick is not angularjs event

pedroabreu commented 8 years ago

Try passing a function to the on-click event so you can debug it an see what's passed to that function

Atanasovski commented 8 years ago

I try everything, also with ng-cordova, but without success. I came from PHP and angular with directives, templates, $templateCache... is just to confusing for me at the moment.

I just need on your gallery where you can doubletap to zoom image, to be added functionality on-hold or ng-click on the image and than to be open native share via https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git. so that image could be shared.

if you can do that, I will pay for your time.

gkiko commented 7 years ago

Having the ability to set on-hold functionality from HTML would be great. If I have time will contribute to the project for free :smile: