diff --git a/aio/content/examples/reactive-forms/src/app/app.module.ts b/aio/content/examples/reactive-forms/src/app/app.module.ts index 1772861c85..39b074c178 100644 --- a/aio/content/examples/reactive-forms/src/app/app.module.ts +++ b/aio/content/examples/reactive-forms/src/app/app.module.ts @@ -6,32 +6,38 @@ import { BrowserModule } from '@angular/platform-browser'; import { ReactiveFormsModule } from '@angular/forms'; // <-- #1 import module import { AppComponent } from './app.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; // <-- #1 import component +import { HeroDetailComponent } from './hero-detail/hero-detail.component'; // #enddocregion v1 +// #docregion hero-service-list +// add JavaScript imports import { HeroListComponent } from './hero-list/hero-list.component'; - -import { HeroService } from './hero.service'; // <-- #1 import service +import { HeroService } from './hero.service'; // #docregion v1 @NgModule({ - imports: [ - BrowserModule, - ReactiveFormsModule // <-- #2 add to @NgModule imports - ], declarations: [ AppComponent, HeroDetailComponent, // #enddocregion v1 - HeroListComponent + HeroListComponent // <--declare HeroListComponent // #docregion v1 ], -// #enddocregion v1 - exports: [ // export for the DemoModule + // #enddocregion hero-service-list + imports: [ + BrowserModule, + ReactiveFormsModule // <-- #2 add to @NgModule imports + ], + // #enddocregion v1 + // export for the DemoModule + // #docregion hero-service-list + // ... + exports: [ AppComponent, HeroDetailComponent, - HeroListComponent + HeroListComponent // <-- export HeroListComponent ], - providers: [ HeroService ], // <-- #4 provide HeroService + providers: [ HeroService ], // <-- provide HeroService +// #enddocregion hero-service-list // #docregion v1 bootstrap: [ AppComponent ] }) diff --git a/aio/content/examples/reactive-forms/src/app/hero-detail/hero-detail-2.component.html b/aio/content/examples/reactive-forms/src/app/hero-detail/hero-detail-2.component.html index 1e98354842..79410c4a6d 100644 --- a/aio/content/examples/reactive-forms/src/app/hero-detail/hero-detail-2.component.html +++ b/aio/content/examples/reactive-forms/src/app/hero-detail/hero-detail-2.component.html @@ -1,7 +1,7 @@

Hero Detail

FormControl in a FormGroup

-
+