Comments (3)
Never gave that a try. Are you sure you're using different tags for each ad in the repeat?
from ngdfp.
It's working for me, but after 30seconds when it supposed to refresh it disappears..
this is my html:
<div class="post-brick-ad margin-top-20" ng-if="index == 2">
<div ng-dfp-ad="homePage1" ng-dfp-ad-refresh-interval="30000"></div>
</div>
<div class="post-brick-ad margin-top-20" ng-if="index == 6">
<div ng-dfp-ad="homePage2" ng-dfp-ad-refresh-interval="30000"></div>
</div>
<div class="post-brick-ad margin-top-20" ng-if="index == 12">
<div ng-dfp-ad="homePage3" ng-dfp-ad-refresh-interval="30000"></div>
</div>
from ngdfp.
got it to work with this code: (removed ng-dfp-ad-refresh-interval from the ads)
$rootScope.$on('$stateChangeStart', function(){
$interval.cancel(adsInterval);
$rootScope.state_loading = true;
});
$rootScope.$on('$stateChangeSuccess', function(){
$rootScope.state_loading = false;
adsInterval = $interval(function() {
DoubleClick
.getSlot('homePage1')
.then(function (slot) {
googletag.pubads().clear([slot]);
})
.getSlot('homePage2')
.then(function (slot) {
googletag.pubads().clear([slot]);
})
.getSlot('homePage3')
.then(function (slot) {
googletag.pubads().clear([slot]);
});
$timeout(function(){
DoubleClick.refreshAds('homePage1', 'homePage2', 'homePage3');
},3000);
}, 30000);
});
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.