-
-
Save anonymous/ffccb1fe86dd5c3c42eeb81cf9734376 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { AdService } from './ad.service'; | |
import { AdBanner } from './ad-banner'; | |
@Component({ | |
selector: 'app-root', | |
template: ` | |
<div> | |
<app-ad-banner [ads]="ads"></app-ad-banner> | |
</div> | |
` | |
}) | |
export class AppComponent implements OnInit { | |
ads: AdBanner[]; | |
constructor(private adService: AdService) {} | |
ngOnInit() { | |
this.ads = this.adService.getAds(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment