richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
219 stars 77 forks source link

Is not working with "NgbModal" popup #36

Closed binishmp closed 5 years ago

binishmp commented 6 years ago

Hi,

I want to use the strip add card functionality in popup. It is working in normal html templates. But it showing following error while using in popup. I am using Angular 5.

ERROR Error: The selector you specified (.card-element-box) applies to no DOM elements that are currently on the page. Make sure the element exists on the page before calling mount().

I understand that the specified html element is not available while calling stripe service since it is dynamically added by popup. Please help me to resolve the issue

Thanks

noahjerreel commented 6 years ago

Hello @binishprabhakar ,

Make sure that the form or parent of the dom elements is not controlled by structural directives (like ngIf). Using structural directives, it creates or destroys the elements thus stripe can't find the element upon request.

binishmp commented 5 years ago

Thanks