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

Configurable parent element for the dialog view #14

Closed petarov closed 7 years ago

petarov commented 7 years ago

By default the dialog is attached to 'document.body'. This seems to be a problem with some frameworks, i.e., Ionic 1.3. One may now pass the parent element as a 'dialog.parent' option.

Example:

      nonRenewing.initialize({
        dialog: {
          parent: document.querySelectorAll('.my-view')[0]
        },

Should also fix issue #10.

j3k0 commented 7 years ago

Great, thanks for contributing! Would it be possible document this in the README as well (to make this PR complete, and used by people).

petarov commented 7 years ago

@j3k0 thx a lot for your fast feedback!