// #docplaster // #docregion import { Component } from '@angular/core'; // Can't test with ROUTER_DIRECTIVES yet // import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router-deprecated'; import { RouteConfig, RouterLink, RouterOutlet, ROUTER_PROVIDERS } from '@angular/router-deprecated'; import { DashboardComponent } from './dashboard.component'; import { HeroesComponent } from './heroes.component'; import { HeroDetailComponent } from './hero-detail.component'; import { HeroService } from './hero.service'; import { BAG_DIRECTIVES, BAG_PROVIDERS } from './bag'; @Component({ selector: 'my-app', template: `

{{title}}


Bag-a-specs

External Template Comp

Comp With External Template Comp

`, /* */ styleUrls: ['app/app.component.css'], directives: [RouterLink, RouterOutlet, BAG_DIRECTIVES], providers: [ ROUTER_PROVIDERS, HeroService, BAG_PROVIDERS ] }) @RouteConfig([ { path: '/dashboard', name: 'Dashboard', component: DashboardComponent, useAsDefault: true }, { path: '/detail/:id', name: 'HeroDetail', component: HeroDetailComponent }, { path: '/heroes', name: 'Heroes', component: HeroesComponent } ]) export class AppComponent { title = 'Tour of Heroes'; }