j3k0 / cordova-non-renewing-subscription

Simple API for Non-Renewing Subscriptions based on Fovea's Cordova Purchase Plugin
MIT License
19 stars 6 forks source link

Angular js #10

Closed okancelik34 closed 8 years ago

okancelik34 commented 8 years ago

How can ı add this plugin with angular js ng click?

j3k0 commented 8 years ago

Sorry I can help with Angular, did you find a solution?

petarov commented 8 years ago

I can't get this to work as well. I think (but I'm not sure) @okancelik34 means that nothing happens when nonRenewing.openSubscriptionManager(); gets called.

I'm still tracing the issue, my subscriptions are being loaded ok as I saw when I set verbosity: store.DEBUG.

EDIT: I'm using Ionic 1.x btw.

petarov commented 8 years ago

@okancelik34 Here's one possible example. Also check out the dialog options.

  $scope.doPurchase = function(event)  {
    event.preventDefault();
    nonRenewing.openSubscriptionManager();   
  };

  <button class="button button-block" ng-click="doPurchase($event)">Buy</button>