Angularjs 离子电池中的CordovaSocialShare不工作

Angularjs 离子电池中的CordovaSocialShare不工作,angularjs,cordova,ionic-framework,ionic,cordova-plugins,Angularjs,Cordova,Ionic Framework,Ionic,Cordova Plugins,我正在使用NgCordova的插件cordovaSocialShare在我的应用程序中进行社交网络共享。问题是我没有返回操作,在分析ADB日志时,它会返回以下错误: I / chromium (3635): [INFO: ISLAND (20306)] "TypeError: Can not call method 'canShareVia' of undefined I / chromium (3635): Scope at $ scope.shareViaWhatsapp. (File: /

我正在使用NgCordova的插件cordovaSocialShare在我的应用程序中进行社交网络共享。问题是我没有返回操作,在分析ADB日志时,它会返回以下错误:

I / chromium (3635): [INFO: ISLAND (20306)] "TypeError: Can not call method 'canShareVia' of undefined
I / chromium (3635): Scope at $ scope.shareViaWhatsapp. (File: ///android_asset/www/js/app.js: 22: 31)
看看代码:

HTML


有人能帮我吗?

不管怎样,我还是自己决定了这个问题

结果是:

在命令行中:

ionic plugin add cordova-plugin-SocialSharing
AngularJS:

$scope.share = function($title, $excerpt, $permalink) {
      $ionicListDelegate.closeOptionButtons();
      window.plugins.socialsharing.share($title, $excerpt, null, $permalink);
}
HTML:


ionic plugin add cordova-plugin-SocialSharing
$scope.share = function($title, $excerpt, $permalink) {
      $ionicListDelegate.closeOptionButtons();
      window.plugins.socialsharing.share($title, $excerpt, null, $permalink);
}
<ion-option-button class="button-positive button-share" ng-click="share('{{item.title}}', '{{item.excerpt}}', '{{item.permalink}}')">
        <i class="icon ion-android-share-alt"></i>
</ion-option-button>