Using StripeCardComponent in conjunction with ngx-stripe, I'm encountering the issue of resetting the form after adding the Stripe card. Do you have any insights on how to achieve this?
<ngx-stripe-card [options]="cardOptions" [elementsOptions]="elementsOptions" (change)="cardUpdated($event)" (error)="error = $event"></ngx-stripe-card>
<div class="error">
{{error?.message}}
</div>
<button (click)="getCardToken()" [disabled]="!complete">Get Card Token</button>
I attempted the following approach but faced issues with it not functioning as intended:
addcard(){
(document.querySelector('.ElementsApp') as HTMLFormElement).reset();
}
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'reset' of null TypeError: Cannot read property 'reset' of null
Displayed Runtime Html