Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70433

Something about view life clycle : ngAfterViewInit Issue

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 70433

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>