Brandon ff118810ff docs(router): Updated routing examples to use routing modules (#2478)
Simplified routing in tutorial example

Updated ngmodule guide and ngmodule faq with routing module prose
2016-10-05 14:59:09 -07:00

31 lines
698 B
TypeScript

// #docregion
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { HeroListComponent } from './hero-list.component';
import { HeroDetailComponent } from './hero-detail.component';
import { HeroService } from './hero.service';
// #docregion heroes-routes
import { HeroRoutingModule } from './heroes-routing.module';
@NgModule({
imports: [
CommonModule,
FormsModule,
HeroRoutingModule
],
declarations: [
HeroListComponent,
HeroDetailComponent
],
providers: [
HeroService
]
})
// #enddocregion heroes-routes
export class HeroesModule {}
// #enddocregion