I have tried to add the admob to vuejs but the are no clear code of how to integrate it with vue component. I have checked from the internet and vueJs doesn't have clear solution for admob.
//import admob from 'nativescript-admob'
export default {
name:'AdsPage',
mounted() {
setTimeout(() => {
admob.createBanner({
// if this 'view' property is not set, the banner is overlayed on the current top most view
// view: ..,
testing: true, // set to false to get real banners
size: 550, // anything in admob.AD_SIZE, like admob.AD_SIZE.SMART_BANNER
androidBannerId: "ca-app-pub-3940256099942544/6300978111", // add your own
margins: {
// if both are set, top wins
//top: 10
bottom: 50
},
}).then(
function() {
console.log("admob createBanner done");
},
function(error) {
console.log("admob createBanner error: " + error);
}
)
},5000)
}````