forked from masvis/angular4-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
54 lines (50 loc) · 1.86 KB
/
index.ts
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
import {ModuleWithProviders, NgModule} from '@angular/core';
import {HttpClient, HttpClientModule} from '@angular/common/http';
import {HalParam, RestService} from './src/rest.service';
import {ExternalService} from './src/external.service';
import {ResourceService} from './src/resource.service';
import {ExternalConfigurationHandlerInterface} from './src/external-configuration.handler';
import 'rxjs';
import {SubTypeBuilder} from './src/subtype-builder';
export {ExternalService} from './src/external.service';
export {RestService} from './src/rest.service';
export {Resource} from './src/resource';
export {ResourceArray} from './src/resource-array';
export {Sort} from './src/sort';
export {ResourceHelper} from './src/resource-helper';
export {CacheHelper} from './src/cache/cache.helper';
export {EvictStrategy} from './src/cache/cache.helper';
export {ResourceExpire} from './src/cache/cache.helper';
export {ExternalConfiguration} from './src/ExternalConfiguration';
export {ExternalConfigurationHandlerInterface} from './src/external-configuration.handler';
export {HalOptions, HalParam} from "./src/rest.service";
export {SubTypeBuilder} from "./src/subtype-builder";
@NgModule({
imports: [HttpClientModule],
declarations: [],
exports: [HttpClientModule],
providers: [
ExternalService,
HttpClient,
{
provide: ResourceService,
useClass: ResourceService,
deps: [ExternalService]
}]
})
export class AngularHalModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: AngularHalModule,
providers: [
ExternalService,
HttpClient,
{
provide: ResourceService,
useClass: ResourceService,
deps: [ExternalService]
}
]
};
}
}