Skip to content

Commit bffff6b

Browse files
committed
fix Visual Editor Auto Sync Load
1 parent e0d4d9d commit bffff6b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
import {Inject, Injectable} from '@angular/core';
22
import {LOCALESS_BROWSER_CONFIG, LocalessBrowserConfig} from "../localess.config";
3-
import {ContentAsset, loadLocalessSync} from "@localess/js-client";
3+
import {loadLocalessSync} from "@localess/js-client";
44

55
/**
66
* @since v0.2.2
77
*/
88
@Injectable({
99
providedIn: 'root'
1010
})
11-
export class BrowserVisualEditor {
11+
export class BrowserVisualEditorService {
1212

1313
constructor(
1414
@Inject(LOCALESS_BROWSER_CONFIG) readonly config: LocalessBrowserConfig
1515
) {
16-
console.log('[Localess]BrowserVisualEditor', config);
17-
loadLocalessSync(config.origin)
16+
console.log('[Localess]BrowserVisualEditorService', config);
17+
}
18+
19+
/**
20+
* Initiate Sync Script Load
21+
*/
22+
init() {
23+
console.log('[Localess]BrowserVisualEditorService init()');
24+
loadLocalessSync(this.config.origin)
1825
}
1926
}

0 commit comments

Comments
 (0)