2016-04-25 22:42:22 -07:00
|
|
|
// #docregion
|
2016-04-27 11:28:22 -07:00
|
|
|
import { Component } from '@angular/core';
|
2016-05-04 15:58:43 +02:00
|
|
|
import { Routes, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router';
|
2016-04-25 22:42:22 -07:00
|
|
|
|
2016-05-24 15:16:23 +02:00
|
|
|
import { NavComponent } from './shared';
|
|
|
|
import { DashboardComponent } from './+dashboard';
|
|
|
|
import { HeroesComponent, HeroService } from './+heroes';
|
2016-04-25 22:42:22 -07:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'toh-app',
|
|
|
|
templateUrl: 'app/app.component.html',
|
|
|
|
styleUrls: ['app/app.component.css'],
|
|
|
|
directives: [ROUTER_DIRECTIVES, NavComponent],
|
|
|
|
providers: [
|
|
|
|
ROUTER_PROVIDERS,
|
|
|
|
HeroService
|
|
|
|
]
|
|
|
|
})
|
2016-05-04 15:58:43 +02:00
|
|
|
@Routes([
|
|
|
|
{ path: '/dashboard', component: DashboardComponent }, // , useAsDefault: true}, // coming soon
|
|
|
|
{ path: '/heroes/...', component: HeroesComponent },
|
2016-04-25 22:42:22 -07:00
|
|
|
])
|
|
|
|
export class AppComponent {}
|