2015-12-23 12:42:57 -05:00
|
|
|
// #docplaster
|
|
|
|
// #docregion
|
2016-04-27 14:28:22 -04:00
|
|
|
import { Component } from '@angular/core';
|
2016-05-03 08:06:32 -04:00
|
|
|
|
2015-12-23 12:42:57 -05:00
|
|
|
import { HeroService } from './hero.service';
|
|
|
|
import { HeroesComponent } from './heroes.component';
|
|
|
|
// #enddocregion
|
|
|
|
|
|
|
|
// For testing only
|
2016-04-27 14:28:22 -04:00
|
|
|
import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router-deprecated';
|
2015-12-23 12:42:57 -05:00
|
|
|
|
|
|
|
// #docregion
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'my-app',
|
|
|
|
template: `
|
|
|
|
<h1>{{title}}</h1>
|
|
|
|
<my-heroes></my-heroes>
|
|
|
|
`,
|
|
|
|
directives: [HeroesComponent],
|
|
|
|
providers: [
|
|
|
|
// #enddocregion
|
|
|
|
ROUTER_PROVIDERS,
|
|
|
|
// #docregion
|
|
|
|
HeroService
|
|
|
|
]
|
|
|
|
})
|
|
|
|
export class AppComponent {
|
|
|
|
title = 'Tour of Heroes';
|
|
|
|
}
|
|
|
|
// #enddocregion
|