
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
27 lines
504 B
TypeScript
27 lines
504 B
TypeScript
// #docregion
|
|
// #docregion imports
|
|
import { Component, Inject } from '@angular/core';
|
|
|
|
import { APP_CONFIG, AppConfig } from './app.config';
|
|
// #enddocregion imports
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
template: `
|
|
<h1>{{title}}</h1>
|
|
<app-car></app-car>
|
|
<app-heroes></app-heroes>
|
|
`
|
|
})
|
|
export class AppComponent {
|
|
title: string;
|
|
|
|
// #docregion ctor
|
|
constructor(@Inject(APP_CONFIG) config: AppConfig) {
|
|
this.title = config.title;
|
|
}
|
|
// #enddocregion ctor
|
|
}
|
|
// #enddocregion
|
|
|