diff --git a/aio/content/examples/bootstrapping/src/app/app.module.ts b/aio/content/examples/bootstrapping/src/app/app.module.ts index 9b8a4fcaef..58c78b33ac 100644 --- a/aio/content/examples/bootstrapping/src/app/app.module.ts +++ b/aio/content/examples/bootstrapping/src/app/app.module.ts @@ -5,7 +5,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; // #docregion directive-import @@ -24,7 +24,7 @@ import { ItemDirective } from './item.directive'; imports: [ BrowserModule, FormsModule, - HttpClientModule + HttpModule ], providers: [], bootstrap: [AppComponent] diff --git a/aio/content/examples/dependency-injection-in-action/src/app/app.module.ts b/aio/content/examples/dependency-injection-in-action/src/app/app.module.ts index 490670a71c..a240e21f7c 100644 --- a/aio/content/examples/dependency-injection-in-action/src/app/app.module.ts +++ b/aio/content/examples/dependency-injection-in-action/src/app/app.module.ts @@ -1,7 +1,7 @@ // #docregion import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpModule } from '@angular/http'; // import { AppRoutingModule } from './app-routing.module'; import { LocationStrategy, @@ -54,7 +54,7 @@ const c_components = [ imports: [ BrowserModule, FormsModule, - HttpClientModule, + HttpModule, InMemoryWebApiModule.forRoot(HeroData) // AppRoutingModule TODO: add routes ], diff --git a/aio/content/examples/feature-modules/src/app/app.module.ts b/aio/content/examples/feature-modules/src/app/app.module.ts index e74c19377a..503d6a46a1 100644 --- a/aio/content/examples/feature-modules/src/app/app.module.ts +++ b/aio/content/examples/feature-modules/src/app/app.module.ts @@ -3,7 +3,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; // import the feature module here so you can add it to the imports array below @@ -17,7 +17,7 @@ import { CustomerDashboardModule } from './customer-dashboard/customer-dashboard imports: [ BrowserModule, FormsModule, - HttpClientModule, + HttpModule, CustomerDashboardModule // add the feature module here ], providers: [], diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/app.module.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/app.module.ts index d8d65b4404..fa3ee4def3 100644 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/app.module.ts +++ b/aio/content/examples/lazy-loading-ngmodules/src/app/app.module.ts @@ -1,7 +1,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpModule } from '@angular/http'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; @@ -13,7 +13,7 @@ import { AppComponent } from './app.component'; imports: [ BrowserModule, FormsModule, - HttpClientModule, + HttpModule, AppRoutingModule ], providers: [], diff --git a/aio/content/examples/ngmodules/src/app/app.module.ts b/aio/content/examples/ngmodules/src/app/app.module.ts index a2bae93468..a19fbbae52 100644 --- a/aio/content/examples/ngmodules/src/app/app.module.ts +++ b/aio/content/examples/ngmodules/src/app/app.module.ts @@ -1,7 +1,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpModule } from '@angular/http'; /* App Root */ import { AppComponent } from './app.component'; diff --git a/aio/content/examples/styleguide/src/app/app.module.ts b/aio/content/examples/styleguide/src/app/app.module.ts index 2420170d4f..1e974baf5f 100644 --- a/aio/content/examples/styleguide/src/app/app.module.ts +++ b/aio/content/examples/styleguide/src/app/app.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; +import { BrowserModule } from '@angular/platform-browser'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpModule } from '@angular/http'; import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; import { RouterModule } from '@angular/router'; @@ -44,7 +44,7 @@ import * as s0901 from '../09-01/app/app.module'; @NgModule({ imports: [ BrowserModule, - HttpClientModule, + HttpModule, InMemoryWebApiModule.forRoot(HeroData), s0101.AppModule, diff --git a/aio/content/guide/bootstrapping.md b/aio/content/guide/bootstrapping.md index 42c0ffe7ae..dc5b873d29 100644 --- a/aio/content/guide/bootstrapping.md +++ b/aio/content/guide/bootstrapping.md @@ -18,7 +18,8 @@ If you use the CLI to generate an app, the default `AppModule` is as follows: /* JavaScript imports */ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; - +import { FormsModule } from '@angular/forms'; +import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; @@ -28,7 +29,9 @@ import { AppComponent } from './app.component'; AppComponent ], imports: [ - BrowserModule + BrowserModule, + FormsModule, + HttpModule ], providers: [], bootstrap: [AppComponent] @@ -134,8 +137,8 @@ It tells Angular about other NgModules that this particular module needs to func This list of modules are those that export components, directives, or pipes that the component templates in this module reference. In this case, the component is -`AppComponent`, which references components, directives, or pipes in `BrowserModule`. -Other common components in the examples are `FormsModule` and `HttpClientModule`. +`AppComponent`, which references components, directives, or pipes in `BrowserModule`, +`FormsModule`, or `HttpModule`. A component template can reference another component, directive, or pipe when the referenced class is declared in this module or the class was imported from another module. diff --git a/aio/content/guide/entry-components.md b/aio/content/guide/entry-components.md index 990c8ae84a..d57654218d 100644 --- a/aio/content/guide/entry-components.md +++ b/aio/content/guide/entry-components.md @@ -36,7 +36,7 @@ The following is an example of specifying a bootstrapped component, imports: [ BrowserModule, FormsModule, - HttpClientModule, + HttpModule, AppRoutingModule ], providers: [],