ratson / cordova-plugin-admob-free

New development has been moved to "admob-plus-cordova", https://github.com/admob-plus/admob-plus/tree/master/packages/cordova
https://github.com/admob-plus/admob-plus
MIT License
494 stars 210 forks source link

Looking for tutorial/example of how to integrate OnsenUI and Vue.js support. #192

Open rlam3 opened 6 years ago

rlam3 commented 6 years ago

Looking for tutorial/example of how to integrate OnsenUI and Vue.js support.

Was wondering if this supports for Vue.js and OnsenUI apps. Thanks!

rlam3 commented 6 years ago

Tried integrating to vue-cordova-webpack


<script>
//import {banner} from 'cordova-plugin-admob-free/admob'
admob.banner.config({
  id: 'ca-app-pub-XXX/XXXXX'
})
console.log(admob)
console.log(admob.banner)
console.log(admob.banner.config)

Error ...


WARNING in ./src/components/HomePage.vue

  ✘  http://eslint.org/docs/rules/no-undef  'admob' is not defined  
  src/components/HomePage.vue:48:1
  admob.banner.config({
   ^

  ✘  http://eslint.org/docs/rules/no-undef  'admob' is not defined  
  src/components/HomePage.vue:51:13
  console.log(admob)
               ^

  ✘  http://eslint.org/docs/rules/no-undef  'admob' is not defined  
  src/components/HomePage.vue:52:13
  console.log(admob.banner)
               ^

  ✘  http://eslint.org/docs/rules/no-undef  'admob' is not defined  
  src/components/HomePage.vue:53:13
  console.log(admob.banner.config)
               ^

@ratson Would love your input on what the proper way to integrate this cordova plugin with vue js app. Thanks!

rlam3 commented 6 years ago

Hi,

I've been struggling to grasp where and how to integrate this plugin with vue.js. If you have any idea on how to get this working, please let me know thank you!

https://bitbucket.org/rlam3/011_cordova_admob/