Thanks for that. the code works in my main.html, BUT can you think of a reason why this shouldn't work in an ng-repeat or inside a template?
thanks, enrico. On Sunday, July 7, 2013 2:28:51 PM UTC+2, Pablo Ezequiel Leone Signetti wrote: > > You should do a wrapper directive to the adSense script like this... > > <div data-my-ad-sense> > <!-- Google AdSense --> > <script async src=" > http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> > <ins class="adsbygoogle" > style="display:inline-block;width:728px;height:90px" > data-ad-client="ca-pub-0000000000" > data-ad-slot="0000000000"></ins> > <script> > (adsbygoogle = window.adsbygoogle || []).push({}); > </script> > </div> > > And add this directive to your directives... > > directive('myAdSense', function() { > return { > restrict: 'A', > transclude: true, > replace: true, > template: '<div ng-transclude></div>', > link: function ($scope, element, attrs) {} > } > }) > > This is the adSense async code. > -- 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.
