Skip to main content
Version: Next

Interstitial Ad

Usage

import { AdMob } from '@admob-plus/ionic/ngx';
import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';

@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
constructor(private platform: Platform, private admob: AdMob) {
this.platform.ready().then(async () => {
const interstitial = new this.admob.InterstitialAd({
adUnitId: 'ca-app-pub-xxx/yyy',
})

await interstitial.load()
await interstitial.show()
});
}
}