-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathindex.ts
99 lines (98 loc) · 3.11 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/* tslint:disable */
/**
* @module SDKModule
* @author Jonathan Casarrubias <t:@johncasarrubias> <gh:jonathan-casarrubias>
* @license MIT 2016 Jonathan Casarrubias
* @version 2.1.0
* @description
* The SDKModule is a generated Software Development Kit automatically built by
* the LoopBack SDK Builder open source module.
*
* The SDKModule provides Angular 2 >= RC.5 support, which means that NgModules
* can import this Software Development Kit as follows:
*
*
* APP Route Module Context
* ============================================================================
* import { NgModule } from '@angular/core';
* import { BrowserModule } from '@angular/platform-browser';
* // App Root
* import { AppComponent } from './app.component';
* // Feature Modules
* import { SDK[Browser|Node|Native]Module } from './shared/sdk/sdk.module';
* // Import Routing
* import { routing } from './app.routing';
* @NgModule({
* imports: [
* BrowserModule,
* routing,
* SDK[Browser|Node|Native]Module.forRoot()
* ],
* declarations: [ AppComponent ],
* bootstrap: [ AppComponent ]
* })
* export class AppModule { }
*
**/
import { JSONSearchParams } from './services/core/search.params';
import { ErrorHandler } from './services/core/error.service';
import { LoopBackAuth } from './services/core/auth.service';
import { LoggerService } from './services/custom/logger.service';
import { SDKModels } from './services/custom/SDKModels';
import { InternalStorage, SDKStorage } from './storage/storage.swaps';
import { HttpModule } from '@angular/http';
import { CommonModule } from '@angular/common';
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CookieBrowser } from './storage/cookie.browser';
import { StorageBrowser } from './storage/storage.browser';
import { UserApi } from './services/custom/User';
import { QuestionApi } from './services/custom/Question';
import { AnswerApi } from './services/custom/Answer';
/**
* @module SDKBrowserModule
* @description
* This module should be imported when building a Web Application in the following scenarios:
*
* 1.- Regular web application
* 2.- Angular universal application (Browser Portion)
* 3.- Progressive applications (Angular Mobile, Ionic, WebViews, etc)
**/
@NgModule({
imports: [ CommonModule, HttpModule ],
declarations: [ ],
exports: [ ],
providers: [
ErrorHandler
]
})
export class SDKBrowserModule {
static forRoot(internalStorageProvider: any = {
provide: InternalStorage,
useClass: CookieBrowser
}): ModuleWithProviders {
return {
ngModule : SDKBrowserModule,
providers : [
LoopBackAuth,
LoggerService,
JSONSearchParams,
SDKModels,
UserApi,
QuestionApi,
AnswerApi,
internalStorageProvider,
{ provide: SDKStorage, useClass: StorageBrowser }
]
};
}
}
/**
* Have Fun!!!
* - Jon
**/
export * from './models/index';
export * from './services/index';
export * from './lb.config';
export * from './storage/storage.swaps';
export { CookieBrowser } from './storage/cookie.browser';
export { StorageBrowser } from './storage/storage.browser';