2016-03-26 12:18:13 -04:00
|
|
|
// #docregion
|
2016-07-05 21:20:33 -05:00
|
|
|
import { bootstrap } from '@angular/platform-browser-dynamic';
|
|
|
|
import { XHRBackend } from '@angular/http';
|
|
|
|
import { appRouterProviders } from './app.routes';
|
2016-03-26 12:18:13 -04:00
|
|
|
import { LocationStrategy,
|
2016-04-27 11:28:22 -07:00
|
|
|
HashLocationStrategy } from '@angular/common';
|
2016-03-26 12:18:13 -04:00
|
|
|
|
|
|
|
import { HeroData } from './hero-data';
|
|
|
|
import { InMemoryBackendService,
|
2016-05-20 19:07:01 -07:00
|
|
|
SEED_DATA } from 'angular2-in-memory-web-api';
|
2016-03-26 12:18:13 -04:00
|
|
|
|
|
|
|
import { AppComponent } from './app.component';
|
|
|
|
|
|
|
|
// #docregion bootstrap
|
|
|
|
bootstrap(AppComponent, [
|
2016-07-05 21:20:33 -05:00
|
|
|
appRouterProviders,
|
2016-06-03 18:00:53 +02:00
|
|
|
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
2016-03-26 12:18:13 -04:00
|
|
|
|
2016-06-03 18:00:53 +02:00
|
|
|
{ provide: XHRBackend, useClass: InMemoryBackendService }, // in-mem server
|
|
|
|
{ provide: SEED_DATA, useClass: HeroData } // in-mem server data
|
2016-03-26 12:18:13 -04:00
|
|
|
]).catch((err: any) => console.error(err));
|
|
|
|
// #enddocregion bootstrap
|