@peterkhang69 wrote:
Can you please help me with an issue. Its urgent and important
(<any>window).cancelCallback = ()=>{ debugger; console.log("Cancel callback was created with window instance"); this.loader.dismiss(); };
This is the callback method for payment. It is added to window every time I enter the view hence upon payment completion or cancellation the respective callback method is called as many number of times as I have entered that specific ts file where the callback methods are written. How should I get them added only once or remove them upon leaving the view. Kindly help as this is very urgent.
Ive tried writing this in ngAfterViewInit but it still does the same thing
From slack channel
Posts: 1
Participants: 1