2016-12-14 13:30:25 -08:00
|
|
|
// #docplaster
|
2016-08-09 17:38:25 +01:00
|
|
|
// #docregion
|
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
|
|
import { FormsModule } from '@angular/forms';
|
2016-12-14 20:35:29 -08:00
|
|
|
import { HttpModule, JsonpModule } from '@angular/http';
|
|
|
|
|
2016-08-09 17:38:25 +01:00
|
|
|
|
2016-09-25 15:24:13 -07:00
|
|
|
import { InMemoryWebApiModule } from 'angular-in-memory-web-api';
|
2016-08-19 04:23:55 -07:00
|
|
|
import { HeroData } from './hero-data';
|
2016-12-14 20:35:29 -08:00
|
|
|
import { requestOptionsProvider } from './default-request-options.service';
|
2016-08-19 04:23:55 -07:00
|
|
|
|
|
|
|
import { AppComponent } from './app.component';
|
2016-08-09 17:38:25 +01:00
|
|
|
|
|
|
|
import { HeroListComponent } from './toh/hero-list.component';
|
|
|
|
import { HeroListPromiseComponent } from './toh/hero-list.component.promise';
|
|
|
|
|
|
|
|
import { WikiComponent } from './wiki/wiki.component';
|
|
|
|
import { WikiSmartComponent } from './wiki/wiki-smart.component';
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
BrowserModule,
|
|
|
|
FormsModule,
|
|
|
|
HttpModule,
|
2016-08-19 04:23:55 -07:00
|
|
|
JsonpModule,
|
|
|
|
// #docregion in-mem-web-api
|
|
|
|
InMemoryWebApiModule.forRoot(HeroData)
|
|
|
|
// #enddocregion in-mem-web-api
|
2016-08-09 17:38:25 +01:00
|
|
|
],
|
|
|
|
declarations: [
|
|
|
|
AppComponent,
|
|
|
|
HeroListComponent,
|
|
|
|
HeroListPromiseComponent,
|
|
|
|
WikiComponent,
|
|
|
|
WikiSmartComponent
|
|
|
|
],
|
2016-12-14 20:35:29 -08:00
|
|
|
// #docregion provide-default-request-options
|
|
|
|
providers: [ requestOptionsProvider ],
|
|
|
|
// #enddocregion provide-default-request-options
|
2016-08-09 17:38:25 +01:00
|
|
|
bootstrap: [ AppComponent ]
|
|
|
|
})
|
2016-12-14 20:35:29 -08:00
|
|
|
export class AppModule {}
|
2016-08-09 17:38:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|