Put ad's in HTML DIV?


#1

Hello,

I have already implemented ad’s with admob, but for my new project, I want to know if it’s possible add a banner in ng-repeat ? Like every 5 result for example ?

I don’t need to work with admob obvious, if there is an other Ad’s Service whose permit to do that, it’s not a problem.

Thanks

EDIT:

With Admod, the position of the banner is handled from the javascript, so I don’t know how to put it in the HTML.
Forgot the Ng-repeat, my question is how to positionning it in HTML, in my view like:

<div>
MY BANNER
</div>

I want do that:
http://googleadsdeveloper.blogspot.co.uk/2012/03/embedding-admob-ads-within-listview-on.html


#2

So, this is not possible ?


#3

This may be a naive way to approach this, but you can use the index of the ng-repeat to conditionally trigger the ad display.

Here’s an example for showing the banner after each 3 results are displayed.


#4

Hi thanks emily, but I know do that, it’s not realy my question (Sorry).

My question is how put the ad in the HTML because I have already implement a banner with admob

JS code:

 if(window.plugins && window.plugins.AdMob) {
                var admob_key = device.platform == "Android" ? "XXXXXXXXXXX" : "XXXXXXXX";
                var admob = window.plugins.AdMob;
                admob.createBannerView( 
                    {
                        'publisherId': admob_key,
                        'adSize': admob.AD_SIZE.BANNER,
                        'bannerAtTop': false
                    }, 
                    function() {
                        admob.requestAd(
                            { 'isTesting': false }, 
                            function() {
                                admob.showAd(true);
                            }, 
                            function() { console.log('failed to request ad'); }
                        );
                    }, 
                    function() { console.log('failed to create banner view'); }
                );
            }

The position of the banner is handled from the javascript, so I don’t know how to put it in the HTML.
Forgot the Ng-repeat, my question is how to positionning it in HTML, in my view like:

<div>
My BANNER
</div>

Thanks

I want do that:
http://googleadsdeveloper.blogspot.co.uk/2012/03/embedding-admob-ads-within-listview-on.html