This commit updates the docs examples to be compatible with the `import-spacing` tslint rule. This is in preparation of updating the docs examples `tslint.json` to match the one generated for new Angular CLI apps in a future commit. PR Close #38143
25 lines
448 B
TypeScript
25 lines
448 B
TypeScript
// #docregion
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
|
import { AdService } from './ad.service';
|
|
import { AdItem } from './ad-item';
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
template: `
|
|
<div>
|
|
<app-ad-banner [ads]="ads"></app-ad-banner>
|
|
</div>
|
|
`
|
|
})
|
|
export class AppComponent implements OnInit {
|
|
ads: AdItem[];
|
|
|
|
constructor(private adService: AdService) {}
|
|
|
|
ngOnInit() {
|
|
this.ads = this.adService.getAds();
|
|
}
|
|
}
|
|
|