I'm trying putting Google Adsense ads inside an Angularjs ng-repeat like 
below. But its not working

<div ng-repeat="item in items"
<div ng-include src="view.getItem($index)"></div>
<script async 
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<div ng-if="$index == 0" google-adsense>
    <ins class="adsbygoogle responsive"
         style="display:inline-block;width:468px;height:60px"
         data-ad-client="ca-pub-"
         data-ad-slot=""></ins>
    <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
</div>
</div>

I see below error in my console.

Uncaught Error: adsbygoogle.push(): All ins elements in the DOM with 
class=adsbygoogle already have ads in them

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to