-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.module.ts
More file actions
59 lines (54 loc) · 2.07 KB
/
app.module.ts
File metadata and controls
59 lines (54 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
declare var require: any;
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { HttpClientXsrfModule } from '@angular/common/http';
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';
import { InMemoryDataService } from './core/in-memory-data.service';
import { RequestCache, RequestCacheWithMap } from './core/request-cache.service';
import { AuthService } from './core/auth.service';
import { httpInterceptorProviders } from './core/http-interceptors';
import { AppComponent } from './app.component';
import { ChartModule } from "angular2-highcharts";
import { ROUTING } from "./app.routing";
import { CoreModule } from './core/core.module';
import { SharedModule } from './shared/shared.module';
import { NavModule } from './layout/nav/nav.module';
import { AssetModule } from './business/asset/asset.module';
@NgModule({
imports: [
BrowserAnimationsModule,
SharedModule,
CoreModule,
NavModule,
AssetModule,
// import HttpClientModule after BrowserModule.
HttpClientModule,
HttpClientXsrfModule.withOptions({
cookieName: 'My-Xsrf-Cookie',
headerName: 'My-Xsrf-Header',
}),
// The HttpClientInMemoryWebApiModule module intercepts HTTP requests
// and returns simulated server responses.
// Remove it when a real server is ready to receive requests.
HttpClientInMemoryWebApiModule.forRoot(
InMemoryDataService, {
dataEncapsulation: false,
passThruUnknownUrl: true,
put204: false // return entity after PUT/update
}
),
ROUTING,
ChartModule.forRoot(require('highcharts'))
],
declarations: [
AppComponent
],
providers: [
AuthService,
{ provide: RequestCache, useClass: RequestCacheWithMap },
httpInterceptorProviders
],
bootstrap: [AppComponent]
})
export class AppModule { }