Simplified routing in tutorial example Updated ngmodule guide and ngmodule faq with routing module prose
31 lines
698 B
TypeScript
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
|