-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
46 lines (41 loc) · 1.12 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
import { ModuleWithProviders, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SampleComponent } from './src/sample.component';
import { SampleDirective } from './src/sample.directive';
import { SamplePipe } from './src/sample.pipe';
import { WooCartService } from "./src/cart.service";
import { WooApiService } from './src/woocommerce.service';
import { CoolStorageModule } from 'angular2-cool-storage';
export * from './src/sample.component';
export * from './src/sample.directive';
export * from './src/sample.pipe';
export * from './src/woocommerce.service';
export * from './src/cart.service';
@NgModule({
imports: [
CommonModule,
CoolStorageModule.forRoot()
],
declarations: [
SampleComponent,
SampleDirective,
SamplePipe
],
exports: [
SampleComponent,
SampleDirective,
SamplePipe
]
})
export class WooApiModule {
static forRoot(config: Object): ModuleWithProviders {
return {
ngModule: WooApiModule,
providers: [
WooApiService,
{provide: 'config', useValue: config},
WooCartService
]
};
}
}