docs(aio): update migrated content from anguar.io
This commit is contained in:

committed by
Pete Bacon Darwin

parent
ff82756415
commit
fd72fad8fd
39
aio/content/examples/reactive-forms/src/app/app.module.ts
Normal file
39
aio/content/examples/reactive-forms/src/app/app.module.ts
Normal file
@ -0,0 +1,39 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
// #docregion v1
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { ReactiveFormsModule } from '@angular/forms'; // <-- #1 import module
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { HeroDetailComponent } from './hero-detail.component'; // <-- #1 import component
|
||||
// #enddocregion v1
|
||||
import { HeroListComponent } from './hero-list.component';
|
||||
|
||||
import { HeroService } from './hero.service'; // <-- #1 import service
|
||||
// #docregion v1
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
ReactiveFormsModule // <-- #2 add to Angular module imports
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
HeroDetailComponent, // <-- #3 declare app component
|
||||
// #enddocregion v1
|
||||
HeroListComponent
|
||||
// #docregion v1
|
||||
],
|
||||
// #enddocregion v1
|
||||
exports: [ // export for the DemoModule
|
||||
AppComponent,
|
||||
HeroDetailComponent,
|
||||
HeroListComponent
|
||||
],
|
||||
providers: [ HeroService ], // <-- #4 provide HeroService
|
||||
// #docregion v1
|
||||
bootstrap: [ AppComponent ]
|
||||
})
|
||||
export class AppModule { }
|
||||
// #enddocregion v1
|
Reference in New Issue
Block a user