From 14a1cb9ee751668c5b1dd34bba954bdd91014faf Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Wed, 3 May 2017 23:00:22 +0200 Subject: [PATCH] docs(admob): improve example (#1454) --- src/@ionic-native/plugins/admob/index.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/admob/index.ts b/src/@ionic-native/plugins/admob/index.ts index f0305281d..82e4e313a 100644 --- a/src/@ionic-native/plugins/admob/index.ts +++ b/src/@ionic-native/plugins/admob/index.ts @@ -96,8 +96,9 @@ export interface AdExtras { * @usage * ```typescript * import { AdMob } from '@ionic-native/admob'; + * import { Platform } from 'ionic-angular'; * - * constructor(private admob: AdMob) { } + * constructor(private admob: AdMob, private platform: Platform ) { } * * ionViewDidLoad() { * this.admob.onAdDismiss() @@ -105,7 +106,13 @@ export interface AdExtras { * } * * onClick() { - * this.admob.prepareInterstitial('YOUR_ADID') + * let adId; + * if(this.platform.is('android') { + * adId = 'YOUR_ADID_ANDROID'; + * } else if (this.platform.is('ios')) { + * adId = 'YOUR_ADID_IOS'; + * } + * this.admob.prepareInterstitial(adId) * .then(() => { this.admob.showInterstitial(); }); * } *