mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-14 17:58:21 +00:00
experimental: standalone About component (#3228)
This commit is contained in:
@@ -22,21 +22,12 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ModuleWithProviders, NgModule, Provider } from '@angular/core';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AboutComponent } from './about.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { SharedModule, PageLayoutModule } from '@alfresco/aca-shared';
|
||||
|
||||
import { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
|
||||
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
||||
import { PACKAGE_JSON } from './package-json.token';
|
||||
import { AboutModule } from '@alfresco/adf-core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, RouterModule, TranslateModule, SharedModule, PageLayoutModule, AboutModule],
|
||||
declarations: [AboutComponent],
|
||||
imports: [AboutComponent],
|
||||
providers: [provideExtensionConfig(['about.plugin.json'])]
|
||||
})
|
||||
export class AcaAboutModule {
|
||||
@@ -45,20 +36,4 @@ export class AcaAboutModule {
|
||||
'app.about.component': AboutComponent
|
||||
});
|
||||
}
|
||||
|
||||
public static forRoot(devMode: any, packageJson?: any): ModuleWithProviders<AcaAboutModule> {
|
||||
const providers: Provider[] = [{ provide: DEV_MODE_TOKEN, useValue: devMode }];
|
||||
|
||||
if (packageJson) {
|
||||
providers.push({
|
||||
provide: PACKAGE_JSON,
|
||||
useValue: packageJson
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
ngModule: AcaAboutModule,
|
||||
providers
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user