mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
extension loader accepts dynamic configurations
This commit is contained in:
parent
39fe06ea1a
commit
6cdae78cf2
@ -31,7 +31,7 @@ export class ExtensionLoaderService {
|
|||||||
constructor(private http: HttpClient) {
|
constructor(private http: HttpClient) {
|
||||||
}
|
}
|
||||||
|
|
||||||
load(configPath: string, pluginsPath: string): Promise<ExtensionConfig> {
|
load(configPath: string, pluginsPath: string, extensions?: ExtensionConfig[]): Promise<ExtensionConfig> {
|
||||||
return new Promise<any>((resolve) => {
|
return new Promise<any>((resolve) => {
|
||||||
this.loadConfig(configPath, 0).then((result) => {
|
this.loadConfig(configPath, 0).then((result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
@ -53,6 +53,10 @@ export class ExtensionLoaderService {
|
|||||||
.sort(sortByOrder)
|
.sort(sortByOrder)
|
||||||
.map((entry) => entry.config);
|
.map((entry) => entry.config);
|
||||||
|
|
||||||
|
if (extensions && extensions.length > 0) {
|
||||||
|
configs.push(...extensions);
|
||||||
|
}
|
||||||
|
|
||||||
if (configs.length > 0) {
|
if (configs.length > 0) {
|
||||||
config = mergeObjects(config, ...configs);
|
config = mergeObjects(config, ...configs);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user