core/plugins/plugins-resolve.service.ts
Properties |
Methods |
constructor(translateService: TranslateService, fetchClient: FetchClient, appState: AppStateService, injector: EnvironmentInjector, optionsService: OptionsService)
|
||||||||||||||||||
Parameters :
|
clearURLRemotesCache |
clearURLRemotesCache()
|
Clears URL remotes cache.
Returns :
void
|
loadModule | ||||||
loadModule(remoteNgModule: NgModuleRef
|
||||||
Type parameters :
|
||||||
Parameters :
Returns :
NgModuleRef<T>
|
loadModulesDynamically | ||||||
loadModulesDynamically(remoteModules: Array
|
||||||
Loads modules and handles hooking correctly.
Parameters :
Returns :
void
|
loadProviders | |||||||||
loadProviders(providers: Provider[], name: string)
|
|||||||||
Parameters :
Returns :
void
|
Async loadRemotes | ||||||||
loadRemotes(remotes: ApplicationRemotePlugins)
|
||||||||
Loads a list of remotes so that a particular application can use them.
The request is made to the following address: /apps/
Parameters :
Returns :
unknown
Returns the list of loaded modules from remotes. |
loadUrlRemotes |
loadUrlRemotes()
|
Retrieves the remotes list from the URL.
Returns :
ApplicationRemotePlugins
Returns the list of remotes. |
markPluginsAsLoaded |
markPluginsAsLoaded()
|
Returns :
void
|
mergeMFRemotes | ||||||||
Use the static function mergeRemotes as this is a pure function. **Example** ```typescript const remotesA:ApplicationRemotePlugins = { contextPathA: ['moduleA', 'moduleB'] }; const remotesB:ApplicationRemotePlugins = { contextPathA: ['moduleA'], contextPathB: ['moduleZ'] }; const mergedRemotes:ApplicationRemotePlugins = mergeMFRemotes([remotesA, remotesB]); // Result { contextPathA: ['moduleA', 'moduleB'], contextPathB: ['moduleZ'] } ``` | ||||||||
mergeMFRemotes(mfRemotes: ApplicationRemotePlugins[])
|
||||||||
Takes a list of remotes and turns it into an object containing union of corresponding remotes. Example Example :
Parameters :
Returns :
ApplicationRemotePlugins
Returns object with merged remotes. |
Static mergeRemotes | ||||||||
mergeRemotes(remotes: ApplicationRemotePlugins[])
|
||||||||
Takes a list of remotes and turns it into an object containing union of corresponding remotes. Example Example :
Parameters :
Returns :
ApplicationRemotePlugins
Returns object with merged remotes. Example Example :
|
refreshHooks |
refreshHooks()
|
Will refresh all current registered hooks.
Returns :
void
|
Static removeRemotes | |||||||||
removeRemotes(remotesToRemoveFrom: ApplicationRemotePlugins, remotesToRemove?: ApplicationRemotePlugins)
|
|||||||||
Parameters :
Returns :
ApplicationRemotePlugins
|
resolveRemotePlugins | ||||||||
resolveRemotePlugins(remoteModules: Array
|
||||||||
Loads plugins by resolving the remote NgModules and injecting it. Also attaching the hooks onto the root injector.
Parameters :
Returns :
void
|
allPluginsLoaded$ |
Type : Observable<boolean>
|
injectors$ |
Type : Observable<EnvironmentInjector | Injector>
|
Emits all injectors of already loaded plugins on subscription. |
pluginDetails$ |
Type : Observable<literal type>
|
Emits all plugin details of already loaded plugins on subscription. |
refresh$ |
Type : Observable<void>
|
Emits once remotePlugins have been resolved. |