Comments (5)
How are you displaying your ads with ngdfp? I do get those errors and I haven't been able to figure out why they're occurring bug my ads do show. —
Ian Murray S.
On Thu, Sep 11, 2014 at 10:51 PM, Anas Qadrei [email protected]
wrote:
Hello
My ad is being displayed using dfp generated tags but it is not being displayed when I use ngDfp. The error I am getting the console when I use ngDFP is:Uncaught TypeError: Cannot read property 'addService' of null angular-dfp.js:57 (anonymous function) angular-dfp.js:57 q angular.min.js:7 _initialize angular-dfp.js:56 (anonymous function) angular-dfp.js:118
I'm using angular v1.3.0-beta.9
Reply to this email directly or view it on GitHub:
#1
from ngdfp.
I just followed the instructions and changed the ids to my ids
first step, I created angular-dfp.js in my project and then I copied and pasted the code from github.
/lib/ng-dfp/angular-dfp.js
second, I included the library at the bottom of my html page
<script src="/lib/angular/angular.min.js"></script>
...
<script src="/lib/ng-dfp/angular-dfp.js"></script>
third, I changed my my ng-app.js
var myApp = angular.module('myApp', [
...
'ngDfp',
...
]);
myApp.config([..., 'DoubleClickProvider', function(..., DoubleClickProvider) {
DoubleClickProvider.defineSlot('/11xxxx09/test_wide_skyscraper', [160, 600], 'div-gpt-ad-14xxxxxxxxx61-0');
}]);
Finally, in my html page I added this line
<div data-ng-dfp-ad="div-gpt-ad-14xxxxxxxxx61-0"></div>
from ngdfp.
Can you verify that the directive is actually doing something? Inspect the element and see if dfp is serving the ad?
Thanks!
from ngdfp.
Not sure what happened here but now it is working.
Before I had both google dfp scripts and ngDfp scripts on my page to compare them. So when I wanted to inspect ngDfp, I removed all google dfp scripts and then ngDfp served ads successfully!
Maybe you can call the ad twice from the same page or something.
from ngdfp.
Well that's it, you can't have a tag twice on a page, they're unique.
I'll leave this ticket open since the error you described is technically still a bug though.
Thanks.
—
Ian Murray S.
On Thu, Sep 11, 2014 at 11:55 PM, Anas Qadrei [email protected]
wrote:
Not sure what happened here but now it is working.
Before I had both google dfp scripts and ngDfp scripts on my page to compare them. So when I wanted to inspect ngDfp, I removed all google dfp scripts and then ngDfp served ads successfully!Maybe you can call the ad twice from the same page or something.
Reply to this email directly or view it on GitHub:
#1 (comment)
from ngdfp.
Related Issues (20)
- Support for enableSyncRendering() HOT 5
- defineOutOfPageSlot support
- change setPageTargeting method to setTargeting HOT 1
- Responsive ads not working HOT 1
- ngDfp module cannot be injected when the source files are compressed using grunt uglify HOT 1
- DoubleClick.refreshAds not working with multiple arguments
- open link in other brower HOT 5
- Support for callbacks?
- Works with localhost? HOT 4
- Can I pass a custom callback function of my own? HOT 1
- Where is the defineOutOfPageSlot function?
- Open Ad links in safari/chrome? HOT 1
- $interval.cancel dose not working
- Ad Targeting
- Not an issue as such but a feature add HOT 1
- Google robot/spider fail HOT 1
- how to set PageTargeting() dynamically HOT 2
- Looking for maintainer
- how to use it with angular 2 ? HOT 2
- ng-dfp-ad-hide-when-empty and data-ng-dfp-ad-container doesn't work with Firefox (42.0) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngdfp.