Update adbutler.component.ts

This commit is contained in:
piotrpekala7 2020-09-02 18:58:55 +02:00
parent 36b610eafa
commit 8687c0b1f0

View File

@ -14,6 +14,15 @@ export class AdbutlerComponent implements OnInit {
theme: string; theme: string;
onLoad = new EventEmitter(); onLoad = new EventEmitter();
htmlCode: string; htmlCode: string;
staticCode: string = `<a href="https://try.solarwinds.com/gns3-free-toolset-giveaway?CMP=LEC-HAD-GNS3-SW_NA_X_NP_X_X_EN_STSGA_SW-ST-20200901_ST_OF1_TRY-NWSLTR">
Access Our Favorite Network Free Tools!
</a><br/>
Access 20+ network performance management, monitoring, and troubleshooting tools for FREE ($200 Value).<br/>
<button>
<a target="_blank" href="https://try.solarwinds.com/gns3-free-toolset-giveaway?CMP=LEC-HAD-GNS3-SW_NA_X_NP_X_X_EN_STSGA_SW-ST-20200901_ST_OF1_TRY-NWSLTR">
Check it out!
</a>
</button>`;
constructor( constructor(
private httpClient: HttpClient private httpClient: HttpClient
@ -28,7 +37,8 @@ export class AdbutlerComponent implements OnInit {
this.htmlCode = response['placements'].placement_1.body; this.htmlCode = response['placements'].placement_1.body;
this.ad.nativeElement.insertAdjacentHTML('beforeend', this.htmlCode); this.ad.nativeElement.insertAdjacentHTML('beforeend', this.htmlCode);
} else { } else {
this.onLoad.emit(false); this.onLoad.emit(true);
this.htmlCode = this.staticCode;
} }
}, },
error => {} error => {}