document.addEventListener in ionic?


#1

Working with Admob-free plugin. there is no doc found in plugin page how to fire interstitial close event,

//this is the code for javscript
document.addEventListener('admob.interstitial.events.CLOSE', function (event) {
    console.log(event)
    admob.interstitial.prepare()
})
//i want this code   in ionic3 

can someone help how to do this in typescript/ ionic3


#2

@rashnk try this


document.addEventListener('admob.interstitial.events.CLOSE', (event) => {
     console.log(event);
    admob.interstitial.prepare();
     });