-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
40 lines (40 loc) · 1.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<link href="bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet" type="text/css">
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angularjs/angular.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="js/main.js"></script>
</head>
<body ng-app="app">
<div class="container">
<div class="page-header">
<h1>
AngularJS Google Adsense Test
</h1>
</div>
<p class="lead">
This is a demo of getting Google Adsense to work with AngularJS
</p>
<p>
For more information, please contact <a href="mailto:[email protected]">Leonard Teo</a>.
</p>
<h2>
Description of the problem
</h2>
<p>
AngularJS (created by Google) is a single-page-application framework. It loads in content dynamically without a full refresh of the DOM (Document Object Model). This appears to be incompatible with Adsense and DFP.
</p>
<p>
To fix this, pass in a random value to the ad-region parameter. See the source code for more details.
</p>
<p>
<a class="btn btn-primary" href="#/page1">Page 1</a> <a class="btn btn-primary" href="#/page2">Page 2</a>
</p>
<hr>
<div ng-view=""></div>
</div>
<!-- Google Ad Script --><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</body>
</html>