E
E
EleGant232015-01-05 10:51:21
JavaScript
EleGant23, 2015-01-05 10:51:21

How to pass angular data to script?

Dynamically it is necessary to fill the attribute parameter .... and so that it would be passed to execution ... I
use onsen + angularjs + phonegap
In general, here is the code on the page

<ons-col class="action-col" ng-click="openSocialSharing('qqqq {{phone.adress_lat}} wwwww')">
                <div class="action-icon"><ons-icon  icon="ion-loading-c" spin="true"></ons-icon></div>
                <div class="action-label">Поделиться</div>
              </ons-col>

Here is the code in js file
$scope.openSocialSharing = function(qqrq){
       console.log('ПАРАМЕТР - '+qqrq); 
    window.plugins.socialsharing.share(qqrq);
  }

And here is what the console output is
01-05 13:43:41.760: I/chromium(17719): [INFO:CONSOLE(197)] "PARAMETER - qqqq wwwww", source: file:///android_asset/www/js/controllers .js (197)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey P, 2015-01-05
@ruddy22

doesn't that work?

<ons-col class="action-col" ng-click="openSocialSharing('qqqq phone.adress_lat wwwww')">
                <div class="action-icon"><ons-icon  icon="ion-loading-c" spin="true"></ons-icon></div>
                <div class="action-label">Поделиться</div>
              </ons-col>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question