appfeel / admob-google-cordova

AdMob ads Cordova/Phonegap/Intel XDK plugin for Android iPhone with latest SDK's
MIT License
133 stars 127 forks source link

'Admob' refers to a value, but is being used as a type here. Did you mean 'typeof Admob'? #131

Open Iv4nildo opened 1 year ago

Iv4nildo commented 1 year ago

i'm following the documentation on a capacitor app

https://ionicframework.com/docs/native/admob but this error made me stop:

Error: src/app/tab1/tab1.page.ts:13:20 - error TS2749: 'Admob' refers to a value, but is being used as a type here. Did you mean 'typeof Admob'?

13     private admob: Admob

image does anyone have a solution for this?

jahertor commented 1 year ago

Same here. I tried with: import { AdmobOriginal } from '@awesome-cordova-plugins/admob';

And in constructor: private admob: AdmobOriginal

And now editor is okay, but ionic doesn't compile.

I ended using "Admob Plus" instead.

skol-pro commented 1 year ago

Same issue.

duca14036 commented 1 year ago

try

import {Admob} from '@awesome-cordova-plugins/admob/ngx';

difference is the ngx at the end