mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Improve compatibility (#7214)
* refactor content * refactor core * refactor rest * fix lint * fix * lint * lint * fix * fix * fix
This commit is contained in:
@@ -19,8 +19,7 @@ import { Injectable } from '@angular/core';
|
||||
import {
|
||||
AlfrescoApiCompatibility,
|
||||
ContentApi,
|
||||
Core,
|
||||
Node
|
||||
Node, NodesApi
|
||||
} from '@alfresco/js-api';
|
||||
import { ReplaySubject, Subject } from 'rxjs';
|
||||
|
||||
@@ -37,6 +36,7 @@ export class ExternalAlfrescoApiService {
|
||||
alfrescoApiInitialized: ReplaySubject<boolean> = new ReplaySubject(1);
|
||||
|
||||
protected alfrescoApi: AlfrescoApiCompatibility;
|
||||
_nodesApi: NodesApi;
|
||||
|
||||
getInstance(): AlfrescoApiCompatibility {
|
||||
return this.alfrescoApi;
|
||||
@@ -46,8 +46,9 @@ export class ExternalAlfrescoApiService {
|
||||
return this.getInstance().content;
|
||||
}
|
||||
|
||||
get nodesApi(): Core.NodesApi {
|
||||
return this.getInstance().nodes;
|
||||
get nodesApi(): NodesApi {
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
init(ecmHost: string, contextRoot: string) {
|
||||
|
Reference in New Issue
Block a user