42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
|
// #docregion
|
|||
|
import { NgModule } from '@angular/core';
|
|||
|
import { BrowserModule } from '@angular/platform-browser';
|
|||
|
import { FormsModule } from '@angular/forms';
|
|||
|
import { HttpModule, JsonpModule, XHRBackend } from '@angular/http';
|
|||
|
|
|||
|
import { InMemoryBackendService, SEED_DATA } from 'angular2-in-memory-web-api';
|
|||
|
import { HeroData } from './hero-data';
|
|||
|
import { AppComponent } from './app.component';
|
|||
|
|
|||
|
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,
|
|||
|
JsonpModule
|
|||
|
],
|
|||
|
providers: [
|
|||
|
{ provide: XHRBackend, useClass: InMemoryBackendService }, // in-mem server
|
|||
|
{ provide: SEED_DATA, useClass: HeroData } // in-mem server data
|
|||
|
],
|
|||
|
declarations: [
|
|||
|
AppComponent,
|
|||
|
HeroListComponent,
|
|||
|
HeroListPromiseComponent,
|
|||
|
WikiComponent,
|
|||
|
WikiSmartComponent
|
|||
|
],
|
|||
|
bootstrap: [ AppComponent ]
|
|||
|
})
|
|||
|
export class AppModule { }
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|