Angular.js & Adsense

前端 未结 4 1451
面向向阳花
面向向阳花 2020-12-23 15:31

I\'m trying to put ads on my angular.js app, and I\'ve done some reading and discovered it isn\'t possible to just copy and paste the normal adsense code.

I\'ve hear

4条回答
  •  死守一世寂寞
    2020-12-23 16:20

    In the AngularJS controller, add an init() function, add a line

    (adsbygoogle = window.adsbygoogle || []).push({});
    

    Then call this init() function in your view html file.

    See also at
    https://github.com/featen/ags/blob/master/webapp/js/controllers/dict.js

提交回复
热议问题