docs(admob): improve example (#1454)

This commit is contained in:
Daniel Sogl 2017-05-03 23:00:22 +02:00 committed by Ibby Hadeed
parent 92468c9b84
commit 14a1cb9ee7

View File

@ -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(); });
* }
*