@wertzui/ngx-restworld-client 3.4.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/services/settings.service.mjs +36 -16
- package/fesm2015/wertzui-ngx-restworld-client.mjs +41 -20
- package/fesm2015/wertzui-ngx-restworld-client.mjs.map +1 -1
- package/fesm2020/wertzui-ngx-restworld-client.mjs +41 -20
- package/fesm2020/wertzui-ngx-restworld-client.mjs.map +1 -1
- package/lib/services/settings.service.d.ts +24 -5
- package/package.json +1 -1
|
@@ -1,17 +1,36 @@
|
|
|
1
|
-
import { HttpBackend } from "@angular/common/http";
|
|
2
1
|
import { ClientSettings } from "../models/client-settings";
|
|
3
2
|
import { RESTworldClientCollection } from "./restworld-client-collection";
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class SettingsService {
|
|
6
5
|
private _clients;
|
|
7
|
-
private
|
|
8
|
-
private _settings;
|
|
6
|
+
private static _settings;
|
|
9
7
|
get settings(): ClientSettings | undefined;
|
|
10
8
|
private initializing;
|
|
11
9
|
private initialized;
|
|
12
|
-
constructor(
|
|
10
|
+
constructor(_clients: RESTworldClientCollection);
|
|
13
11
|
ensureInitialized(): Promise<void>;
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Call this method in your main.ts before calling bootstrapModule(...)
|
|
14
|
+
*
|
|
15
|
+
* Example:
|
|
16
|
+
* async function main() {
|
|
17
|
+
* try {
|
|
18
|
+
* await SettingsService.ensureSettingsAreLoaded();
|
|
19
|
+
*
|
|
20
|
+
* const providers : StaticProvider[] = [
|
|
21
|
+
* { provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
|
|
22
|
+
* ];
|
|
23
|
+
*
|
|
24
|
+
* await platformBrowserDynamic(providers).bootstrapModule(AppModule);
|
|
25
|
+
* }
|
|
26
|
+
* catch (e) {
|
|
27
|
+
* console.error(e);
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* main();
|
|
32
|
+
* */
|
|
33
|
+
static ensureSettingsAreLoaded(): Promise<void>;
|
|
15
34
|
private populateRESTworldClientCollectionFromSettings;
|
|
16
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<SettingsService, never>;
|
|
17
36
|
static ɵprov: i0.ɵɵInjectableDeclaration<SettingsService>;
|
package/package.json
CHANGED